snippet

How to use select distinct on SQL request

In a query it is possible to add the operator DISTINCT to avoid duplicates. The subtlety is that it is possible to apply this operator on several columns of your table and even on joins if it is mentioned in your query.

SELECT DISTINCT column1, column2, ...
FROM table;