clause
DISTINCT
Removes duplicate output rows across the entire selected tuple. Example target: PostgreSQL 17 and SQLite (local fixture tested).
Formal Syntax & Structure
sql syntaxsql
SELECT DISTINCT expression [, ...]Working Example
Example Snippetsql
SELECT DISTINCT customer_id FROM orders ORDER BY customer_id;