"Travis Whitton" <[EMAIL PROTECTED]> writes:
> Given the following test table, I want to grab only the newest record and
> disregard any older duplicates based on name. Is this the most efficient way
> to do it?

No, it's gonna be pretty awful.  The best way I know of involves
DISTINCT ON (see the "weather reports" example in the SELECT reference
page).  Unfortunately that's a Postgres-only construct.  If you want
something portable then you'll need something messy with subqueries...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to