题解 | 获取有奖金的员工相关信息。

select b.emp_no, e.first_name, e.last_name, b.btype, s.salary, round((case when b.btype=1 then s.salary*0.1 when b.btype=2 then s.salary*0.2 else s.salary*0.3 end),1) bonus 
from employees e join emp_bonus b on e.emp_no=b.emp_no 
join salaries s on b.emp_no=s.emp_no
where s.to_date='9999-01-01'
order by b.emp_no asc

全部评论

相关推荐

01-30 14:09
四川大学 Java
投递兴业数金等公司10个岗位
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务