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
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
Hi there,
I have a problem sorting a SQL result if I use DISTINCT ON.
I have a table "tblcomment" with these columns:
id (serial)
path (varchar)
created (timestamp)
title (varchar)
These records are in the table "tblcomment":
id pathcreated title
--