programming-examples/sql/JoinHRDatabase/26. Write a query in SQL to display the department name and number of employees in each of the department.sql
2019-11-18 14:05:53 +01:00

5 lines
245 B
SQL

/*26. Write a query in SQL to display the department name and number of employees in each of the department.*/
SELECT department_name, COUNT(*)
FROM employees
NATURAL JOIN departments
GROUP BY department_name;