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

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Get the max(value1, value2, value3) from a table
Дата
Msg-id dcc563d10801071443g3c91a29sd27ce5bdf6c4652b@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Get the max(value1, value2, value3) from a table  (Josh Williams <joshwilliams@ij.net>)
Ответы Re: Get the max(value1, value2, value3) from a table  (Emi Lu <emilu@encs.concordia.ca>)
Re: Get the max(value1, value2, value3) from a table  (Erik Jones <erik@myemma.com>)
Список pgsql-sql
On Jan 7, 2008 4:38 PM, Josh Williams <joshwilliams@ij.net> wrote:
> On Mon, 2008-01-07 at 17:03 -0500, Emi Lu wrote:
> > select ?max?(col1, col2, col3) as result;
> > will return
> >
> > result
> > -------
> > 5
> > 8
> > 12
> >
> > (3 rows)
>
> 8.1 (I believe?) introduced GREATEST(), which does precisely what you're
> looking for.

How would greatest give him three rows like that?  Maybe I'm
misunderstanding what the OP was asking for...


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

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