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).
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 Maybe you need a more complex query to get what you want (and use max(created)...). -- Jorge Godoy <[EMAIL PROTECTED]> ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly