Find Customer Referee
You can retrieve the names of the customers who were not referred by the customer with id = 2 by using a simple SELECT query with a WHERE clause. Here’s the query:
|
|
Explanation:
- The
WHERE
clause filters the rows wherereferee_id
is not equal to 2 or is null. - It will return the names of the customers that meet these conditions.