题解 | #统计各个部门的工资记录数#
统计各个部门的工资记录数
http://www.nowcoder.com/practice/6a62b6c0a7324350a6d9959fa7c21db3
select de.dept_no,dept_name,count(*) as sum from dept_emp de
inner join departments d on de.dept_no=d.dept_no
inner join salaries s on de.emp_no=s.emp_no
group by de.dept_no
order by de.dept_no asc;
inner join departments d on de.dept_no=d.dept_no
inner join salaries s on de.emp_no=s.emp_no
group by de.dept_no
order by de.dept_no asc;