题目:1757. 可回收且低脂的产品
题解:
select product_id from Products where low_fats = 'Y' and recyclable = 'Y'
题目:584. 寻找用户推荐人
题解:
select name from Customer where referee_id != 2 or referee_id is NULL
select name from Customer
where id not in (select id from Customer where referee_id = 2)
题目:595. 大的国家
题解:
select name,population,area from World where area>=3000000 or population>=25000000
select name,population,area from World where area>=3000000
union
select name,population,area from World where population>=25000000
题目:1148. 文章浏览 I
题解:
select distinct author_id as id from Views where author_id = viewer_id order by author_id
题目:1683. 无效的推文
题解:
select tweet_id from Tweets where CHAR_LENGTH(content) >15