Re: Sorting with DISTINCT ON

From: Nico Grubert <nicogrubert(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Sorting with DISTINCT ON
Date: 2007-01-08 14:54:34
Message-ID: 45A25B2A.9060203@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> It does allow you to sort on both columns.
>
> SELECT DISTINCT ON (path) path, comment_id, created, title
> FROM bewertungen.tblcomments ORDER BY path, created

Thank you very much. Works perfect! :-)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shoaib Mir 2007-01-08 14:56:10 Re: Command "connect by prior" in PostgreSQL ?
Previous Message Walter Vaughan 2007-01-08 14:49:31 Re: Advice needed on using postgres in commercial product