题解 | #获取有奖金的员工相关信息。#
获取有奖金的员工相关信息。
https://www.nowcoder.com/practice/5cdbf1dcbe8d4c689020b6b2743820bf
select e.emp_no,e.first_name,e.last_name, b.btype,s.salary, case b.btype when 1 then round(salary*0.1,1) when 2 then round(salary*0.2,1) else round(salary*0.3,1) end as bonus from employees e join emp_bonus b on e.emp_no = b.emp_no join (select * from salaries where to_date = '9999-01-01') s on b.emp_no = s.emp_no order by e.emp_no;
这个还行 毕竟不是大厂真题