Received: from web117.yahoomail.com (web117.yahoomail.com [205.180.60.91]) by hub.org (8.9.3/8.9.3) with SMTP id DAA25763 for ; Mon, 27 Sep 1999 03:52:25 -0400 (EDT) (envelope-from dipanc@yahoo.com) Message-ID: <19990927075232.4435.rocketmail@web117.yahoomail.com> Received: from [206.103.11.232] by web117.yahoomail.com; Mon, 27 Sep 1999 00:52:32 PDT Date: Mon, 27 Sep 1999 00:52:32 -0700 (PDT) From: Dipankar Chakrabarti Subject: Re: "order by" weirdness To: pgsql-sql@hub.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >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