题解 | 统计员工薪资扣除比例

select 
s1.staff_id,
s1.staff_name,
concat(round((s2.dock_salary*100/s2.normal_salary),1),"%") dock_ratio
from  staff_tb  s1
 join salary_tb s2
on  s1.staff_id= s2.staff_id
where s1.department = 'dep1'
order by dock_ratio desc;

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务