
This post contains all SQL Interview Questions that we have written so far along with the solutions.
Table Of Content –
- Consecutive Numbers
- Delete Duplicate Emails
- Nth Highest Salary
- Second Highest Salary
- Department Top Three Salaries
- Employees Earning More Than Their Managers
- Customers Who Never Order
- Rank Scores
- Rising Temperature
- Game Play Analysis I
- Game Play Analysis II
- Game Play Analysis III
- Game Play Analysis IV
- Employee Bonus
- Median Employee Salary
- Managers with at Least 5 Direct Reports
- Count Student Number in Departments
- Find Customer Referee
- Customer Placing the Largest Number of Orders
- Consecutive Available Seats
- Exchange Seats
- Human Traffic of Stadium
- Swap Salary
- Triangle Judgement
- Not Boring Movies
- Shortest Distance in a Line
- Shortest Distance in a Plane
- Tree Node
- Customers Who Bought All Products
- Pivot Table with Text data
- Average Salary: Departments VS Company
- Overall Acceptance Rate
- Product sales analysis
- Project Employees II
- Project Employees III
- Sales Analysis II
- Sales Analysis III
- New Users Daily Count
- Highest Grade For Each Students
- Active Businesses
- Article Views
- Market Analysis I
- Product Price at a Given Date
- Immediate Food Delivery
- Reformat Department Table
- Monthly Transactions
- Last Person to Fit in the Bus
- Queries Quality and Percentage
- Team Scores in Football Tournament
- Average Selling Price
- Page Recommendation
- Students and Examinations
- Weather Type in Each Country
- Find the Team Size
- Running Total For Different Genders
- Restaurant Growth
- Ads Performance
- List the Products Ordered in a Period
- Movie Rating
- Students With Invalid Departments
- Activity Participants
- Number of Trusted Contacts of a Customer
- Get the Second Most Recent Activity
- Replace Employee ID With The Unique Identifier
- Capital Gain and Loss
- Customers Who Bought Products A and B but Not C
- Top Travelers
- Evaluate Boolean Expression
- Apples and Oranges
- Calculate Salaries
- Sales by Day of the Week
- Group Sold Products By The Date
- Friendly Movies Streamed Last Month
- Countries You Can Safely Invest In
- Customer Order Frequency
- Patients with a Condition
- The Most Recent Three Orders
- Fix Product Name Format
- The Most Recent Orders for Each Product
- Bank Account Summary
- Unique Orders and Customers Per Month
- Warehouse Manager
- Customer Who Visited but Did Not Make Any Transactions
- Bank Account Summary II
- The Most Frequently Ordered Products for Each Customer
- Sellers With No Sales
- Find the Missing IDs
- Percentage of Users Attended a Contest
- Average Time of Process per Machine
- Fix Names in a Table
- Product’s Worth Over Invoices
- Invalid Tweets
- Daily Leads and Partners
- Number of Calls Between Two Persons
- Count Apples and Oranges
- Find Followers Count
- The Number of Employees Which Report to Each Employee
- Find Total Time Spent by Each Employee
- Leetflex Banned Accounts
- Grand Slam Titles