Re: Get the max(value1, value2, value3) from a table

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: Get the max(value1, value2, value3) from a table
Дата
Msg-id 239138.99803.qm@web31804.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Re: Get the max(value1, value2, value3) from a table  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Ответы Re: Get the max(value1, value2, value3) from a table  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Re: Get the max(value1, value2, value3) from a table  (Emi Lu <emilu@encs.concordia.ca>)
Список pgsql-sql
--- On Mon, 1/7/08, Scott Marlowe <scott.marlowe@gmail.com> wrote:

> select max(col1) from table
> union all
> select max(col2) from table
> union all
> select max(col3) from table

Would the following work also?

SELECT MAX( GREATEST( col1, col2, col3 ) ) FROM TABLE;

Regards,
Richard Broersma Jr.


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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Get the max(value1, value2, value3) from a table
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Get the max(value1, value2, value3) from a table