题解 | #获取有奖金的员工相关信息。#
获取有奖金的员工相关信息。
https://www.nowcoder.com/practice/5cdbf1dcbe8d4c689020b6b2743820bf
select t.emp_no, e.first_name, e.last_name, btype, t.salary, round(eb.btype * t.salary * 0.1, 1) bonus from emp_bonus eb left join ( select emp_no, salary from salaries where to_date = '9999-01-01' ) t on eb.emp_no = t.emp_no join employees e on e.emp_no = t.emp_no