以salaries为主表,两表联查

select dept_no,dept_name,count(*) sum 
    from salaries left join dept_emp using(emp_no)
        left join departments using(dept_no)
    group by dept_no
    order by dept_no