#183 Customers Who Never Order
select name as 'Customers'
from customers
where id not in (select customerid
from orders);
错误尝试:NOT EXISTS, 子查询有多个值忘记用In做介词了。
#620. Not Boring Movies
# Write your MySQL query statement below
select * from cinema
where id&1
and description <> 'boring'
order by rating desc;
官方
奇数:mod(id,2)=1 偶数mod(id,2)=2 返回x除以y以后的余数
627. Swap Salary
UPDATE salary
SET
sex = CASE sex
WHEN 'm' THEN 'f'
ELSE 'm'
END;