三表联查, 以 dept_no 和 title 分组排序
select dept_no,dept_name,title,count(*)
from titles left join dept_emp using(emp_no)
left join departments using(dept_no)
group by dept_no,title
order by dept_no,title;
三表联查, 以 dept_no 和 title 分组排序
select dept_no,dept_name,title,count(*)
from titles left join dept_emp using(emp_no)
left join departments using(dept_no)
group by dept_no,title
order by dept_no,title;