题解 | #汇总各个部门当前员工的title类型的分配数目#
汇总各个部门当前员工的title类型的分配数目
http://www.nowcoder.com/practice/4bcb6a7d3e39423291d2f7bdbbff87f8
select a.dept_no,b.dept_name,c.title,count(c.title)
from dept_emp a
inner join departments b on a.dept_no=b.dept_no
inner join titles c on c.emp_no=a.emp_no
group by a.dept_no,c.title
order by a.dept_no