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