How would you write a SQL query that returns each department name and the number of employees in that department? Include departments that currently have no employees, and exclude employees that are not assigned to a listed department.
department_name and employee_countdepartment_name, then by department_id| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Department name |
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee full name |
| department_id | INT | Assigned department identifier |