题目来源:
leetcode题目,网址:577. 员工奖金 - 力扣(LeetCode)
解题思路:
以 employee 表为基准外连接表 bonus,再删选出符合条件的项。
解题代码:
# Write your MySQL query statement below
select a.name, b.bonus
from employee as a left join bonus as b on a.empId=b.empId
where b.bonus<1000 or b.bonus is null
总结:
不知道为什么执行用时只超过 5% 的用户。