将题目进行代码翻译。先将员工表里的工资进行count,并与dept_emp相交得到每个部门里面员工工资的总数。
select de.dept_no,d.dept_name,count(s.salary) from salaries as s join dept_emp as de join departments as d where s.emp_no=de.emp_no and de.dept_no=d.dept_no group by de.dept_no order by de.dept_no