Click here to see the full article post
select e.name,b.bonus from Employee e, Bonus b where e.empId = b.empid and b.bonus < 1000;
@getyou It could not pass if some employee do not have a bonus.
@yangshun What do you mean exactly?
@yangshun You're right. It's strange. I will work on it. And here is the solution for this problem.
SELECT Employee.name, Bonus.bonus FROM Employee LEFT JOIN Bonus ON Employee.empid = Bonus.empid WHERE bonus < 1000 OR bonus IS NULL ;
@1337c0d3r Indeed. Thanks.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.