A data analyst needs to retrieve all unique job titles from an employees table. Which SQL keyword should be used in the SELECT clause?
Trap 1: UNIQUE
UNIQUE is not a SQL keyword for this purpose; it is used in constraints.
Trap 2: REMOVE DUPLICATES
This is not valid SQL syntax.
Trap 3: FILTER
FILTER is not a standard SQL keyword; filtering is done with WHERE.
- A
UNIQUE
Why wrong: UNIQUE is not a SQL keyword for this purpose; it is used in constraints.
- B
REMOVE DUPLICATES
Why wrong: This is not valid SQL syntax.
- C
DISTINCT
Correct. DISTINCT filters out duplicate rows.
- D
FILTER
Why wrong: FILTER is not a standard SQL keyword; filtering is done with WHERE.