PostgreSQL- DISTINCT Clause
The DISTINCT clause is used in a SELECT statement to eliminate duplicate rows from the result set. It ensures that only unique values are returned for the specified columns, effectively reducing the result set to distinct rows. The basic syntax of using the DISTINCT clause is as follows: SELECT DISTINCT column1, column2, … FROM table_name…