programming-examples/sql/AggregateFunctions/Write a query in SQL to find the number of employees in each department along with the department code.sql

4 lines
180 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*Write a query in SQL to find the number of employees in each department along with the department code.*/
SELECT emp_dept, COUNT(*)
FROM emp_details
GROUP BY emp_dept;