"order by" weirdness

From: Hein Roehrig <hein(at)acm(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: "order by" weirdness
Date: 1999-09-27 00:59:07
Message-ID: E11VP8G-0005nY-00@godot.normed.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

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

Browse pgsql-sql by date

  From Date Subject
Next Message Dipankar Chakrabarti 1999-09-27 07:52:32 Re: "order by" weirdness
Previous Message Tom Lane 1999-09-27 00:04:53 Re: [SQL] IFNULL - problem