Real questions from top companies
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 for second-highest salary using LIMIT, OFFSET, or ROW_NUMBER()
Write a query that identifies numbers appearing at least three times consecutively without interruption
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 minimum age.
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 first number repeating consecutively three times in a sequence.
Write a query to find the median salary of employees in a table.
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 generate the specified output using advanced SQL skills with joins, aggregations, and window functions.
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.