Re: [SQL] Finding the "most recent" rows - Mailing list pgsql-sql

From Brook Milligan
Subject Re: [SQL] Finding the "most recent" rows
Date
Msg-id 199904231442.IAA17294@trillium.nmsu.edu
Whole thread Raw
In response to Re: [SQL] Finding the "most recent" rows  (Julian Scarfe <jas1@scigen.co.uk>)
Responses Re: [SQL] Finding the "most recent" rows
List pgsql-sql
Tom Lane wrote:  >   > SELECT DISTINCT ON place * FROM table ORDER BY place, time DESC;  >   > might do the right
thing. It *seems* to select the first row for each  > value of place.  I've never seen a spec for this feature,
however,so  > I'm not sure if it's reliable or not...
 

Cool idea.  Is DISTINCT guarranteed to choose the first row that
matches or can it choose any row?

Cheers,
Brook


pgsql-sql by date:

Previous
From: "Justin Long"
Date:
Subject: FW: [SQL] SELECT TOP _x_ ??
Next
From: "Justin Long"
Date:
Subject: Large objects - bug? caveat? feature?