DISTINCT is a PostgreSQL specific keyword used to remove duplicate rows from the result set of a query. It can be used with or without an ORDER BY clause. When used without an ORDER BY the result set will be sorted on the column(s) mentioned in the DISTINCT clause. When used with an ORDER BY the result set will be sorted on the column(s) mentioned in both the DISTINCT and ORDER BY clauses.DISTINCT is a PostgreSQL keyword used to remove duplicate rows from the result set of a query. Duplicate rows are those with matching values for all the columns listed in the DISTINCT clause. For example if a table has columns named A B and C the following statement will return only one row for each unique combination of A B and C:SELECT DISTINCT A B CFROM table;This is different from the SQL standard which allows duplicate rows. PostgreSQL also allows you to use DISTINCT ON (expression) to keep only one row for each distinct value of expression.The DISTINCT clause is used in a PostgreSQL SELECT statement to remove duplicate rows from the result set. It keeps only one row for each group of duplicates. The DISTINCT clause can be used on one or more columns of a table. If you use it on multiple columns PostgreSQL will keep only one row that has distinct values for all specified columns.