题解 | #汇总各个部门当前员工的title类型的分配数目#
汇总各个部门当前员工的title类型的分配数目
https://www.nowcoder.com/practice/4bcb6a7d3e39423291d2f7bdbbff87f8
select a.dept_no,b.dept_name,c.title,count(1) count from dept_emp a left join departments b on a.dept_no = b.dept_no left join titles c on c.emp_no =a.emp_no group by a.dept_no,c.title order by a.dept_no,c.title
按照要求把表连接好,再按要求分组聚合即可