Real questions from top companies in SQL Β· medium
Write a SQL query to find the second highest salary in each department.
Write a SQL query to find the top 3 selling products per region in the last month.
Write a SQL query to find the top 5 most ordered dishes in the last 30 days.
Write a SQL query to find the top 5 products by sales per region.
Write a SQL query to find users to recommend specific artists
Write a SQL query to rank shows by daily viewership across different regions
Write a SQL query to remove duplicates from a table.
Write a query that ranks users by their total order amount within each region.
Write a query to calculate Monthly Active Users (MAUs) for July 2022
Write a query to calculate the day's difference between the 1st and 3rd sales of the CustomerName = 'Alice Johnson'.
Write a query to calculate the total revenue generated by each product category.
Write a query to find employees in the same department as 'John'.
Write a query to find the 5th highest salary in an employee table and calculate the number of employees whose salary is greater than that of their manager.
Write a query to find the top 5 most-sold Adidas products in the last month.
Write a query to find the top three customers by total revenue within each region.
Write a query to find the total number of rides per driver in the last 30 days.
Write a query to get the latest rule_id and rule_status.
Write a query to get the names of all employees who are managers with five or more direct reports.
Write a query to identify duplicate customer entries based on email and phone number.
Write a query to identify unique user sessions.
Type or paste your answer to any of these questions and our AI Coach scores it, highlights gaps, and rewrites it at FAANG quality. Free to try.