L1 Q8
Beginner Level
Practice Question
Level 1 - Question 8: Retrieve Unique Departments
Scenario
Your team lead wants to know which departments exist in the company without listing duplicates.
Task
Write a SQL query to retrieve all unique department names from the employees table.
Sample Schema: employees
| emp_id | name | department | salary |
|---|---|---|---|
| 201 | Rahim | IT | 7500 |
| 202 | Karim | Finance | 8200 |
| 203 | Rita | IT | 9100 |