题解 | #统计各个部门的工资记录数#

统计各个部门的工资记录数

https://www.nowcoder.com/practice/6a62b6c0a7324350a6d9959fa7c21db3

select a.dept_no,a.dept_name,count(a.dept_name) as sum
from departments as a,dept_emp as b,salaries as c
where a.dept_no=b.dept_no
and b.emp_no=c.emp_no 
group by dept_no,dept_name
order by dept_no

全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务