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

