Unique Values with DISTINCT
DISTINCT removes duplicate values.
List all unique departments:
Works with multiple columns too:
This finds unique combinations.
COUNT with DISTINCT:
Check your understanding
List all unique department IDs (no duplicates).
Examples run on the employees sample database. Open any of them in the playground to experiment.