Leetcode Top 75 SQL
Leetcode Top 75 SQL
S.
Link
No. Code Title
1 175 Combine Two Tables 175. Combine Two Tables
Employees Earning More 181. Employees Earning More Than Their
2 181 Than Their Managers Managers
3 182 Duplicate Emails 182. Duplicate Emails
4 183 Customers Who Never Order 183. Customers Who Never Order
5 196 Delete Duplicate Emails 196. Delete Duplicate Emails
6 197 Rising Temperature 197. Rising Temperature
7 577 Employee Bonus 577. Employee Bonus
8 584 Find Customer Referee 584. Find Customer Referee
Customer Placing the 586. Customer Placing the Largest Number of
9 586 Largest Number of Orders Orders
10 595 Big Countries 595. Big Countries
Classes More Than 5
596. Classes More Than 5 Students
11 596 Students
12 607 Sales Person 607. Sales Person
13 610 Triangle Judgement 610. Triangle Judgement
14 619 Biggest Single Number 619. Biggest Single Number
15 620 Not Boring Movies 620. Not Boring Movies
16 627 Swap Salary 627. Swap Salary
Actors and Directors Who
1050. Actors and Directors Who Cooperated
Cooperated At Least Three
At Least Three Times
17 1050 Times
18 1068 Product Sales Analysis I 1068. Product Sales Analysis I
19 1075 Project Employees I 1075. Project Employees I
20 1084 Sales Analysis III 1084. Sales Analysis III
21 511 Game Play Analysis I 511. Game Play Analysis I
User Activity for the Past 30
1141. User Activity for the Past 30 Days I
22 1141 Days I
23 1148 Article Views I 1148. Article Views I
24 1179 Reformat Department Table 1179. Reformat Department Table
Queries Quality and
1211. Queries Quality and Percentage
25 1211 Percentage
26 1251 Average Selling Price 1251. Average Selling Price
27 1280 Students and Examinations 1280. Students and Examinations
List the Products Ordered in
1327. List the Products Ordered in a Period
28 1327 a Period
Replace Employee ID With 1378. Replace Employee ID With The Unique
29 1378 The Unique Identifier Identifier
30 1407 Top Travellers 1407. Top Travellers
Group Sold Products By The
1484. Group Sold Products By The Date
31 1484 Date
Find Users With Valid E-
1517. Find Users With Valid E-Mails
32 1517 Mails
33 1527 Patients With a Condition 1527. Patients With a Condition
Customer Who Visited but
1581. Customer Who Visited but Did Not
Did Not Make Any
Make Any Transactions
34 1581 Transactions
35 1587 Bank Account Summary II 1587. Bank Account Summary II
Percentage of Users
1633. Percentage of Users Attended a Contest
36 1633 Attended a Contest
Average Time of Process per
1661. Average Time of Process per Machine
37 1661 Machine
38 1667 Fix Names in a Table 1667. Fix Names in a Table
39 1683 Invalid Tweets 1683. Invalid Tweets
40 1693 Daily Leads and Partners 1693. Daily Leads and Partners
41 1729 Find Followers Count 1729. Find Followers Count
The Number of Employees
1731. The Number of Employees Which
Which Report to Each
Report to Each Employee
42 1731 Employee
Find Total Time Spent by 1741. Find Total Time Spent by Each
43 1741 Each Employee Employee
Recyclable and Low Fat
1757. Recyclable and Low Fat Products
44 1757 Products
Primary Department for 1789. Primary Department for Each
45 1789 Each Employee Employee
46 1795 Rearrange Products Table 1795. Rearrange Products Table
47 1873 Calculate Special Bonus 1873. Calculate Special Bonus
48 1890 The Latest Login in 2020 1890. The Latest Login in 2020
Employees With Missing
1965. Employees With Missing Information
49 1965 Information
Employees Whose Manager 1978. Employees Whose Manager Left the
50 1978 Left the Company Company
Number of Unique Subjects 2356. Number of Unique Subjects Taught by
51 2356 Taught by Each Teacher Each Teacher
52 176 Second Highest Salary 176. Second Highest Salary
53 177 Nth Highest Salary 177. Nth Highest Salary
54 178 Rank Scores 178. Rank Scores
55 180 Consecutive Numbers 180. Consecutive Numbers
56 184 Department Highest Salary 184. Department Highest Salary
Managers with at Least 5
570. Managers with at Least 5 Direct Reports
57 570 Direct Reports
58 585 Investments in 2016 585. Investments in 2016
Friend Requests II: Who Has 602. Friend Requests II: Who Has the Most
59 602 the Most Friends Friends
60 608 Tree Node 608. Tree Node
61 626 Exchange Seats 626. Exchange Seats
Customers Who Bought All
1045. Customers Who Bought All Products
62 1045 Products
63 1070 Product Sales Analysis III 1070. Product Sales Analysis III
64 550 Game Play Analysis IV 550. Game Play Analysis IV
65 1158 Market Analysis I 1158. Market Analysis I
66 1164 Product Price at a Given Date 1164. Product Price at a Given Date
67 1174 Immediate Food Delivery II 1174. Immediate Food Delivery II
68 1193 Monthly Transactions I 1193. Monthly Transactions I
69 1204 Last Person to Fit in the Bus 1204. Last Person to Fit in the Bus
70 1321 Restaurant Growth 1321. Restaurant Growth
71 1341 Movie Rating 1341. Movie Rating
72 1393 Capital Gain/Loss 1393. Capital Gain/Loss
73 1907 Count Salary Categories 1907. Count Salary Categories
74 1934 Confirmation Rate 1934. Confirmation Rate
Department Top Three
185. Department Top Three Salaries
75 185 Salaries
76 262 Trips and Users 262. Trips and Users
77 601 Human Traffic of Stadium 601. Human Traffic of Stadium