50 Easy SQL Questions from LeetCode for Cognizant Placements
SELECT and Filtering (Basic Queries)
- Combine Two Tables
- Employees Earning More Than Their Managers
- Customers Who Never Order
- Big Countries
- Not Boring Movies
- Triangle Judgement
- Rising Temperature
- Find Customer Referee
- Duplicate Emails
JOINs and Relations
- Employee Bonus
- Sales Person
- Find the Team Size
- Swap Salary
- Classes More Than 5 Students
- Consecutive Available Seats
- All People Report to the Given Manager
GROUP BY / Aggregation
- Find Followers Count
- Biggest Single Number
- Customers Who Bought All Products
- Customer Placing the Largest Number of Orders
- List the Products Ordered in a Period
- Number of Transactions per Visit
- Project Employees I
- Project Employees II
- Project Employees III
- Sales Analysis I
Window Functions
- Rank Scores
- Consecutive Numbers
- Running Total for Different Genders
Subqueries and Related
- Second Highest Salary
- Nth Highest Salary
- Employees Whose Manager Left the Company
- Students and Examinations
- Weather Type in Each Country
Miscellaneous (CASE, UPDATE, DELETE, etc.)
- Exchange Seats Between Two Tables
- Delete Duplicate Emails
- Tree Node
- Patients With a Condition
- Managers with at Least 5 Direct Reports
- Active Businesses
- Game Play Analysis I (First Login)
- Game Play Analysis II (First Device)
- Game Play Analysis III (Games So Far)