To get a postgresql behavior similar to mysql's you need to use distinct on:
select distinct on (a) a,b,c from sometable; (or something like that) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general