题解 | 统计员工薪资扣除比例
统计员工薪资扣除比例
https://www.nowcoder.com/practice/08db6f0135664ca598b579f8d53dc486
select t1.staff_id,t2.staff_name,concat(round(t1.dock_salary/t1.normal_salary*100,1),'%') as dock_ratio
from salary_tb as t1
left join staff_tb as t2 using(staff_id)
where staff_id in (
select staff_id
from staff_tb
where department='dep1')
order by 3 desc

