Sorting based on maximum value over several columns

Поиск
Список
Период
Сортировка
От Net Virtual Mailing Lists
Тема Sorting based on maximum value over several columns
Дата
Msg-id 20041107003159.11646@mail.net-virtual.com
обсуждение исходный текст
Ответы Re: Sorting based on maximum value over several columns
Список pgsql-general
Hello,

Lets say I have data like this:


value1|value2|value3|value4|....|value(N)
------|------|------|------|----|--------
100   | 200  | 300  |  400 |    |
10    | 20   |      |  40  |    |
      | 15   |      |  16  |    |
5     |      |      |      |    |


Now I want to sort these based on the maximum value of the data in each
row, so for sorting purposes I would have this:

sort
----
400
40
16
5


Any ideas?...  I've tried several things but none of them have given me
the result I am after....


Thanks as always!

- Greg


В списке pgsql-general по дате отправления:

Предыдущее
От: "Uwe C. Schroeder"
Дата:
Сообщение: Re: SQL question
Следующее
От: Mike Cox
Дата:
Сообщение: Re: Postresql RFD version 2.0 Help Wanted.