Re: [GENERAL] Sorting with DISTINCT ON

2007-01-08 Thread Nico Grubert
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! :-) ---(end of broadcast)--- TIP 3: Have you

Re: [GENERAL] Sorting with DISTINCT ON

2007-01-08 Thread Jorge Godoy
Nico Grubert <[EMAIL PROTECTED]> writes: > My first try was this SQL query: > > SELECT DISTINCT ON (path) path, comment_id, created, title > FROM bewertungen.tblcomments > > This does not allow me to append "ORDER BY created" since I can only sort on > path because of DISTINCT ON (path). I