select c.name from customer c where c.id not in (select id from customer where referee_id = 2);
I am new here so I come up with the following combinations
id | name | referee_id
4 | ss | 2
4 | ss | 3
ss should be in the result, right?
Select name from customer where ifnull(referee_id,0) <> 2
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.