Write an SQL query to retrieve the number of employees in each department.

Last Updated :
Discuss
Comments

Write an SQL query to retrieve the number of employees in each department.

SELECT COUNT() FROM employees ORDER BY department;

SELECT COUNT(department) FROM employees GROUP BY department;

SELECT COUNT(*) FROM employees GROUP BY department;

SELECT COUNT(*) AS employees_count, department FROM employees;

Share your thoughts in the comments