DataEngPrep.tech
QuestionsPracticeAI CoachDashboardPacksBlog
ProLogin

Interview Questions

Real questions from top companies in SQL

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

Finding nth Highest Salary within each department

SQLmediumpartition0.2 min read
Walmart
β†’
202

Given a CSV file with raw customer transactions, design an ETL pipeline that cleans data, aggregates total sales by region and product, and loads into target table

SQLhardetljoinoptimization3.6 min read
McKinsey
β†’
203

Given a complex nested query, how would you refactor it for better readability and efficiency?

SQLmediumjoinwindow0.3 min read
Goldman Sachs
β†’
204

Given a dataset, perform transformations: Filter rows where sales > 1000, Add a new column calculating a 10% discount on sales, Group data by region and calculate total revenue.

SQLeasyspark0.2 min read
Warner Bros Discovery
β†’
205

Given a table of sales data, use window functions to calculate a running total.

SQLmediumpartitionwindow0.2 min read
American Express
β†’
206

Given a table with 10 records and another with 4 records, how many records result from a cross join?

SQLmediumjoin0.2 min read
Aarete
β†’
207

Given a table with sales data, write a query to find consecutive days with decreasing revenue.

SQLmediumjoin0.3 min read
Uber
β†’
208

Given an unoptimized query execution plan, how would you diagnose and improve performance?

SQLmediumjoinpartition0.3 min read
BCG
β†’
209

Given the data below, explain the results of different types of joins: Inner Join, Left Join, Right Join. Will a schema be created?

SQLmediumjoin0.2 min read
Coforge
β†’
210

Given two dataframes (df1: id, name and df2: id, country, address, city, count), join them, filter for rows where country = 'Singapore', and pivot the output. Sort cities in descending order of population count

SQLmediumjoin0.2 min read
JP Morgan
β†’
211

Given two tables, calculate the row count for different types of joins (inner, left, right, and full outer)

SQLmediumjoinsql0.3 min read
Morgan Stanley
β†’
212

HAVING vs WHERE - explain

SQLeasy0.2 min read
Myntra
β†’
213

Handle nulls, duplicates, and inconsistent timestamp formats in data.

SQLmediumpartition0.3 min read
Apple
β†’
214

Hierarchical Employee-Manager Query - navigate hierarchy with head of company as employee_id = 1

SQLmediumjoin0.3 min read
JP Morgan
β†’
215

How can you automate data insertion into BigQuery using Python?

SQLhardairflowbigquerypython0.2 min read
Aarete
β†’
216

How can you delete partitions from a table in Hive using a command?

SQLmediumpartition0.2 min read
Dunnhumby
β†’
217

How did you manage a situation where you lacked knowledge for a task?

SQLhard0.4 min read
ZS Associates
β†’
218

How do partitioning strategies differ between source and sink?

SQLmediumpartition0.3 min read
Virtusa
β†’
219

How do partitions improve query performance in fact tables?

SQLmediumpartition0.3 min read
Microsoft
β†’
220

How do quarantine tables ensure data quality in downstream pipelines?

SQLeasy0.3 min read
PWC
β†’

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...910111213...25Next
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