"Eric G. Miller" <[EMAIL PROTECTED]> writes:
> Looking for the best way to formulate a query to select
> the most "recent" entry for an organization in a table
> like:

Take a look at the SELECT reference page's example for
SELECT DISTINCT ON:

: For example, 
: 
:         SELECT DISTINCT ON (location) location, time, report
:         FROM weatherReports
:         ORDER BY location, time DESC;
:    
: retrieves the most recent weather report for each location.

A tad nonstandard, but bloody effective, particularly if you
have an appropriate index in place...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to