DataEngPrep.tech
QuestionsPracticeAI CoachDashboardPacksBlog
ProLogin

Interview Questions

Real questions from top companies in SQL Β· medium

700+ Easy450+ Medium650+ Hard
All CategoriesBehavioralSpark/Big DataSQLPython/CodingSystem Design/ArchitectureCloud/ToolsGeneral/Othereasymediumhard
241

Write a SQL query to find the second highest salary in each department.

SQLmediumpartitionsql0.2 min read
Delivery Hero
β†’
242

Write a SQL query to find the top 3 selling products per region in the last month.

SQLmediumpartitionsql0.3 min read
Amazon
β†’
243

Write a SQL query to find the top 5 most ordered dishes in the last 30 days.

SQLmediumjoinsql0.2 min read
Swiggy
β†’
244

Write a SQL query to find the top 5 products by sales per region.

SQLmediumpartitionsql0.2 min read
Fragma Data Systems
β†’
245

Write a SQL query to find users to recommend specific artists

SQLmediumjoinsql0.3 min read
media.net
β†’
246

Write a SQL query to rank shows by daily viewership across different regions

SQLmediumjoinpartitionsql0.2 min read
Netflix
β†’
247

Write a SQL query to remove duplicates from a table.

SQLmediumpartitionsql0.4 min read
Incedo
β†’
248

Write a query that ranks users by their total order amount within each region.

SQLmediumpartition0.2 min read
Cognizant
β†’
249

Write a query to calculate Monthly Active Users (MAUs) for July 2022

SQLmediumpartition0.2 min read
NASDAQ
β†’
250

Write a query to calculate the day's difference between the 1st and 3rd sales of the CustomerName = 'Alice Johnson'.

SQLmediumpartition0.3 min read
Grover
β†’
251

Write a query to calculate the total revenue generated by each product category.

SQLmediumjoin0.2 min read
Adidas
β†’
252

Write a query to find employees in the same department as 'John'.

SQLmediumjoin0.3 min read
Incedo
β†’
253

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.

SQLmediumjoin0.3 min read
S&P Global
β†’
254

Write a query to find the top 5 most-sold Adidas products in the last month.

SQLmediumjoin0.2 min read
Adidas
β†’
255

Write a query to find the top three customers by total revenue within each region.

SQLmediumpartition0.2 min read
Uber
β†’
256

Write a query to find the total number of rides per driver in the last 30 days.

SQLmedium0.2 min read
Uber
β†’
257

Write a query to get the latest rule_id and rule_status.

SQLmediumpartitionsnowflakesql0.3 min read
Gartner
β†’
258

Write a query to get the names of all employees who are managers with five or more direct reports.

SQLmediumjoin0.3 min read
Chryselys
β†’
259

Write a query to identify duplicate customer entries based on email and phone number.

SQLmediumjoin0.4 min read
Swiggy
β†’
260

Write a query to identify unique user sessions.

SQLmediumetlpartition0.2 min read
Wayfair
β†’

Reading isn't practice. Get AI feedback on your answers.

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.

Try AI Answer Coach β€” FreeStart a Mock Interview
Previous1...11121314Next
Categories
All QuestionsSQLSpark / Big DataPython / CodingSystem DesignCloud / ToolsBehavioral
By Company
AmazonGoogleDatabricksSnowflakeMicrosoftNetflixUberTCS
Interview Guides
All GuidesTop SQL QuestionsTop Spark QuestionsTop Python QuestionsTop System DesignSQL Window FunctionsETL QuestionsData Modeling
Products
AI Interview CoachAnswer AnalyzerSQL PlaygroundResume AnalyzerInterview PacksPricing
Company
About UsContact UsAI DisclosureDisclaimerTerms of ServicePrivacy Policy
Β© 2026 DataEngPrep.tech. All rights reserved.
AboutBlogContactDisclaimer