Collapse duplicates in a result set.
Section: basic selects
Return distinct values
sql
sql
SELECT DISTINCT status FROM orders ORDER BY status;Explanation
Useful for reporting, filters, and data exploration.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing basic selects