Write an SQL query to report the names of the customer that are not referred by the customer with id = 2.
Return the result table in any order.
Table: Customer
The query result format is in the following example.
Find Customer Referee Leetcode Solution
Explanation
This SQL query selects the names of all customers from a table called "customer" where the "referee_id" column does not equal 2 or is null.
In other words, this query selects all customers who were not referred by a customer with ID 2 or who were not referred by anyone (if their referee_id is null).
The query would return a list of customer names who meet the criteria specified in the WHERE clause.
Disclaimer: The above Problem is generated by Leetcode but the Solution is provided by ShouterFolk