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