标签: sql sql-server-ce
提前致谢....
答案 0 :(得分:0)
SELECT dept.Name, COUNT(emp.id) as timesOccurring FROM departments dept INNER JOIN employees emp ON emp.dept_id = dept.id GROUP BY dept.Name ORDER BY timesOccurring
应该这样做。