L2 Q3
Intermediate Level
Practice Question
Level 2 - Question 3: Filter Departments with More than 2 Employees
Scenario
You want to find departments that have more than 2 employees.
Task
Write a SQL query that returns department and the number of employees in that department, but only for departments having more than 2 employees.
Sample Schema: employees
| emp_id | name | department | salary |
|---|---|---|---|
| 201 | Alam | IT | 8900 |
| 202 | Rina | Sales | 7700 |
| 203 | Jasim | IT | 8200 |
| 204 | Reza | IT | 9100 |