dterrors@hotmail.com wrote:
>
> I've just spent a few hours searching and reading about the postgres
> way of selecting distinct records. I understand the points made about
> the ORDER BY limitation of DISTINCT ON, and the abiguity of GROUP BY,
> but I think there's a (simple, common) case that have been missed in
> the discussion. Here is my sitation:
Did you try putting the DISTINCT ON in a subselect, and the ORDER BY in
an outer select?
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.