Find Department With Most Employees Records

Find the department with the most employees.

sql

SELECT department_name, COUNT(*) AS employee_count FROM employees GROUP BY department_name ORDER BY employee_count DESC LIMIT 1;

This query groups the "employees" table by "department_name", counts the number of records in each group, and returns the department with the highest count.

PromptDB can make mistakes. Please double-check responses.