X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E8D3D4753A1 for ; Mon, 10 Feb 2003 13:52:47 -0500 (EST) Received: from ece.rice.edu (ece.rice.edu [128.42.4.34]) by postgresql.org (Postfix) with ESMTP id 84BDB474E53 for ; Mon, 10 Feb 2003 13:52:47 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by ece.rice.edu (Postfix) with SMTP id D1AB168A84; Mon, 10 Feb 2003 12:52:47 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by ece.rice.edu (Postfix) with ESMTP id 82AF368A64; Mon, 10 Feb 2003 12:52:47 -0600 (CST) Received: from wallace.ece.rice.edu (wallace.ece.rice.edu [128.42.12.154]) by ece.rice.edu (Postfix) with ESMTP id 86F6C68A0E; Mon, 10 Feb 2003 12:52:45 -0600 (CST) Received: from reedstrm by wallace.ece.rice.edu with local (Exim 3.36 #1 (Debian)) id 18iJ2q-0004I3-00; Mon, 10 Feb 2003 12:52:44 -0600 Date: Mon, 10 Feb 2003 12:52:44 -0600 From: "Ross J. Reedstrom" To: Jean-Luc Lachance Cc: "A.M." , pgsql-sql@postgresql.org Subject: Re: order by date desc but NULLs last Message-ID: <20030210185244.GA16454@wallace.ece.rice.edu> Mail-Followup-To: "Ross J. Reedstrom" , Jean-Luc Lachance , "A.M." , pgsql-sql@postgresql.org References: <20030209231204.GB11550@wallace.ece.rice.edu> <3E47F056.DE8707E2@nsd.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E47F056.DE8707E2@nsd.ca> User-Agent: Mutt/1.4i X-Virus-Scanned: by AMaViS snapshot-20020300 X-DCC--Metrics: ece.rice.edu 1067; Body=1 Fuz1=1 Fuz2=1 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/199 X-Sequence-Number: 11597 On Mon, Feb 10, 2003 at 01:32:54PM -0500, Jean-Luc Lachance wrote: > Why not try the obvious first? Because it's not always obvious ;-) Yup, if you want two kinds of order (NULLs last, descending dates), use two order by clauses. > order by gradedtime is null, gradedtime desc; > > "Ross J. Reedstrom" wrote: Ross