[Solved] SQL query to list department names in descending order of employee count


you can try this

SELECT     Department.DeptName, COUNT(Employee.FName) AS EmpCount
FROM         Employee INNER JOIN
                      Department ON Employee.DeptId = Department.ID
GROUP BY Department.DeptName
order by EmpCount

2

solved SQL query to list department names in descending order of employee count