高频 SQL 50 题(基础版) - 学习计划 - 力扣(LeetCode)全球极客挚爱的技术成长平台
1757. 可回收且低脂的产品
sql
SELECT product_id from Products
WHERE low_fats = 'Y' AND recyclable = 'Y';
584. 寻找用户推荐人
sql
SELECT name
FROM Customer
WHERE referee_id <> '2' OR referee_id IS NULL;
595. 大的国家
sql
SELECT name,population,area
FROM World
WHERE area >= '3000000' OR population >= '25000000';
1148. 文章浏览 I
sql
SELECT DISTINCT author_id AS id
FROM Views
WHERE author_id = viewer_id
ORDER BY id ASC;
1683. 无效的推文
sql
SELECT tweet_id
FROM Tweets
WHERE LENGTH(content)>'15';