题解 | 统计各个部门平均薪资

统计各个部门平均薪资

https://www.nowcoder.com/practice/4722fdf89a4c43eebb58d61a19ccab31

select t.department
,avg(t1.normal_salary-t1.dock_salary) as avg_salary
from staff_tb t 
join salary_tb t1 on t.staff_id=t1.staff_id
where (t1.normal_salary-t1.dock_salary)>=4000 and (t1.normal_salary-t1.dock_salary)<=30000
group by t.department
order by avg_salary desc



全部评论

相关推荐

11-03 13:18
门头沟学院 Java
包行:平时怎么刷算法题的哇,字节的手撕听说都很难
字节跳动工作体验
点赞 评论 收藏
分享
头像 会员标识
今天 16:40
浙江大学 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务