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

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

https://www.nowcoder.com/practice/5cdbf1dcbe8d4c689020b6b2743820bf

select e.emp_no,e.first_name,e.last_name,b.btype,sa.salary,round(sa.salary*(b.btype*0.1),1) as bonus 
from employees as e join  emp_bonus as b on  e.emp_no=b.emp_no 
join (
    select emp_no ,salary
from salaries 
where to_date="9999-01-01"
)as sa on e.emp_no=sa.emp_no 
order by e.emp_no 

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务