L2 Q2
Intermediate Level
Practice Question
Level 2 - Question 2: Count Employees by Department
Scenario
You want to know how many employees work in each department.
Task
Write a SQL query that returns each department and the number of employees in that department.
Sample Schema: employees
| emp_id | name | department | salary |
|---|---|---|---|
| 201 | Alam | IT | 8900 |
| 202 | Rina | Sales | 7700 |
| 203 | Jasim | IT | 8200 |