Distinct
distinct
¶
[!What does distinct do?]- removes duplicate tuples for all the selected rows
selects all unique tuples of rep_id & component_Id
distinct on
¶
Postgres specific
it doesn't return the first tuple?????
[!What distinct on does] 1. Run the query 2. At the end, GROUP BY the
ON (col)
usually have LIMIT 1
at the end
Last update:
2023-04-24