在中文站沒找到對應的集合,想來自己動手拷貝過來,方便大家面試復習用,對應英文站點: https://leetcode.com/studyplan/top-sql-50/
Select
- #1757. 可回收且低脂的產品
- 鏈接: https://leetcode.cn/problems/recyclable-and-low-fat-products/
- #584. 尋找用戶推薦人
- 鏈接: https://leetcode.cn/problems/find-customer-referee/
- #595. 大的國家
- 鏈接: https://leetcode.cn/problems/big-countries/
- #1148. 文章瀏覽 I
- 鏈接: https://leetcode.cn/problems/article-views-i/
- #1683. 無效的推文
- 鏈接: https://leetcode.cn/problems/invalid-tweets/
Basic Joins
- #1378. 使用唯一標識碼替換員工ID
- 鏈接: https://leetcode.cn/problems/replace-employee-id-with-the-unique-identifier/
- #1068. 產品銷售分析 I
- 鏈接: https://leetcode.cn/problems/product-sales-analysis-i/
- #1581. 進店卻未進行過交易的顧客
- 鏈接: https://leetcode.cn/problems/customer-who-visited-but-did-not-make-any-transactions/
- #197. 上升的溫度
- 鏈接: https://leetcode.cn/problems/rising-temperature/
- #1661. 每臺機器的平均處理時間
- 鏈接: https://leetcode.cn/problems/average-time-of-process-per-machine/
- #577. 員工獎金
- 鏈接: https://leetcode.cn/problems/employee-bonus/
- #1280. 學生們參加各科測試的次數
- 鏈接: https://leetcode.cn/problems/students-and-examinations/
- #570. 至少有5名直接下屬的經理
- 鏈接: https://leetcode.cn/problems/managers-with-at-least-5-direct-reports/
- #1934. 確認率
- 鏈接: https://leetcode.cn/problems/confirmation-rate/
- #620. 有趣的電影
- 鏈接: https://leetcode.cn/problems/not-boring-movies/
Basic Aggregate Functions
- #1251. 平均售價
- 鏈接: https://leetcode.cn/problems/average-selling-price/
- #1075. 項目員工 I
- 鏈接: https://leetcode.cn/problems/project-employees-i/
- #1633. 各賽事的用戶注冊率
- 鏈接: https://leetcode.cn/problems/percentage-of-users-attended-a-contest/
- #1211. 查詢結果的質量和占比
- 鏈接: https://leetcode.cn/problems/queries-quality-and-percentage/
- #1141. 查詢近30天活躍用戶數
- 鏈接: https://leetcode.cn/problems/user-activity-for-the-past-30-days-i/
Sorting and Grouping
- #1084. 銷售分析 III
- 鏈接: https://leetcode.cn/problems/sales-analysis-iii/
- #596. 超過5名學生的課
- 鏈接: https://leetcode.cn/problems/classes-more-than-5-students/
- #1729. 求關注者的數量
- 鏈接: https://leetcode.cn/problems/find-followers-count/
- #619. 只出現一次的最大數字
- 鏈接: https://leetcode.cn/problems/biggest-single-number/
- #1731. 每位經理的下屬員工數量
- 鏈接: https://leetcode.cn/problems/the-number-of-employees-which-report-to-each-employee/
- #183. 從不訂購的客戶
- 鏈接: https://leetcode.cn/problems/customers-who-never-order/
Advanced Select and Joins
- #1789. 首位 K 個員工的主要部門
- 鏈接: https://leetcode.cn/problems/primary-department-for-each-employee/
- #610. 判斷三角形
- 鏈接: https://leetcode.cn/problems/triangle-judgement/
- #180. 連續出現的數字
- 鏈接: https://leetcode.cn/problems/consecutive-numbers/
- #1164. 指定日期的產品價格
- 鏈接: https://leetcode.cn/problems/product-price-at-a-given-date/
- #1204. 最后一個人
- 鏈接: https://leetcode.cn/problems/last-person-to-fit-in-the-bus/
- #1978. 上級經理已離職的員工
- 鏈接: https://leetcode.cn/problems/employees-whose-manager-left-a-company/
Subqueries
- #184. 部門工資最高的員工
- 鏈接: https://leetcode.cn/problems/department-highest-salary/
- #585. 2016年的投資
- 鏈接: https://leetcode.cn/problems/investments-in-2016/
- #1341. 電影評分
- 鏈接: https://leetcode.cn/problems/movie-rating/
- #602. 好友申請 II :誰有最多的好友
- 鏈接: https://leetcode.cn/problems/friend-requests-ii-who-has-the-most-friends/
- #1321. 餐館營業額變化增長
- 鏈接: https://leetcode.cn/problems/restaurant-growth/
- #185. 部門工資前三高的所有員工
- 鏈接: https://leetcode.cn/problems/department-top-three-salaries/
Advanced String Functions / Regex / Clause
- #1484. 按日期分組銷售產品
- 鏈接: https://leetcode.cn/problems/group-sold-products-by-the-date/
- #1527. 患某種疾病的患者
- 鏈接: https://leetcode.cn/problems/patients-with-a-condition/
- #196. 刪除重復的電子郵箱
- 鏈接: https://leetcode.cn/problems/delete-duplicate-emails/
- #176. 第二高的薪水
- 鏈接: https://leetcode.cn/problems/second-highest-salary/
- #1667. 修復表中的名字
- 鏈接: https://leetcode.cn/problems/fix-names-in-a-table/
- #1517. 查找擁有有效郵箱的用戶
- 鏈接: https://leetcode.cn/problems/find-users-with-valid-e-mails/
Complicated Stuff
- #1193. 每月交易 I
- 鏈接: https://leetcode.cn/problems/monthly-transactions-i/
- #1174. 即時食物配送 II
- 鏈接: https://leetcode.cn/problems/immediate-food-delivery-ii/
- #550. 游戲玩法分析 IV
- 鏈接: https://leetcode.cn/problems/game-play-analysis-iv/
- #2356. 每位教師所教授的科目種類的數量
- 鏈接: https://leetcode.cn/problems/number-of-unique-subjects-taught-by-each-teacher/
- #1070. 產品銷售分析 III
- 鏈接: https://leetcode.cn/problems/product-sales-analysis-iii/
- #1907. 按分類統計薪水
- 鏈接: https://leetcode.cn/problems/count-salary-categories/