584_Find Customer Referee
[easy]
Given a tablecustomer
holding customers information and the referee.
Write a query to return the list of customers NOT referred by the person with id '2'.
For the sample data above, the result is:
Solution:
The trap here is only specify referee_id != 2
in where clause. Then the rows corresponding to NULL id won't show up.
Previous579_Find Cumulative Salary of an EmployeeNext586_Customer Placing the Largest Number of Orders
Last updated