连接三个表,分组之后,再count计算 然后order by 排序完事 select dp.dept_no,dp.dept_name,t.title,count(t.emp_no) from dept_emp as de left join departments as dp on de.dept_no= dp.dept_no left join titles as t on de.emp_no=t.emp_no group by dp.dept_no,dp.dept_name,t.title order by dp.dept_no,t.title;