Re: "order by" weirdness

Поиск
Список
Период
Сортировка
От Dipankar Chakrabarti
Тема Re: "order by" weirdness
Дата
Msg-id 19990927075232.4435.rocketmail@web117.yahoomail.com
обсуждение исходный текст
Ответ на "order by" weirdness  (Hein Roehrig <hein@acm.org>)
Ответы Re: [SQL] Re: "order by" weirdness  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
>Hello,

Dear Hein,

What are you trying to do with order by max(date)?

Order by date will give proper result.  For that
matter group by clause already does ordering, no need
to put a order by there.

Regards,

Dipankar

>consider these three statements:
>
>create table t (id integer, date datetime ) ;
>select id from t group by id ;
>select id from t group by id order by max(date) ;
>
>Is it correct behavior that the second select returns
>one row where

>as the first select returns zero rows? 

>Thanks in advance for any help,
>Hein




__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com


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

Предыдущее
От: Hein Roehrig
Дата:
Сообщение: "order by" weirdness
Следующее
От: Stuart Rison
Дата:
Сообщение: Re: [SQL] comparing 2 tables. . .