Martijn van Oosterhout wrote:
>
> Drop the comma after the distinct on.
>
> SELECT distinct on(dai_genres.id) dsc from dai_genres,
Ok, that worked. But accroding to "\h select" the syntax is:
SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
* | expression [ AS output_name ] [, ...]
I gather that to mean SELECT DISTINCT ON (*) , ...
Is the syntax give by "\h select" wrong or am I misinterpreting it?
Thanks,
--
Jean-Christian Imbeault