Closed
Description
PostgREST should have a way to perform a SELECT DISTINCT
query.
I suggest a new reserved query word 'distinct'.
- With no value it would just do a
select distinct
e.g./mytable?distinct
- Otherwise it is a comma separated list of columns (or computed columns) which would be used inside of
SELECT DISTINCT ON(....)
e.g./mytable?distinct=name
would beSELECT DISTINCT ON(name) * FROM mytable
Note that the columns that you are distinct on will also need to have order applied.