寻找用户推荐人实现
# Write your MySQL query statement below
select name from customer
where referee_id != 2 or
referee_id is NULL
从不订购的客户
# Write your MySQL query statement below
select Name 'Customers' from Customers
where Id not in (
select CustomerId from Orders
)
心得:选择的实现主要是理清思路以及条件的嵌套,一步一步来就好了。
一天一道题!