DataEngPrep.tech
QuestionsPracticeAI CoachDashboardPacksBlog
ProLogin

Interview Questions

Real questions from top companies Β· medium

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

Find average salary for each manager – Assume a table with manager_id and employee_salary

SQLmedium0.2 min read
Pubmatic
β†’
242

Find each student's previous year's scores using the LAG function.

SQLmediumpartition0.2 min read
Deolite
β†’
243

Find employees who earn the third-highest salary.

SQLmedium0.2 min read
Incedo
β†’
244

Find the 2nd highest salary for each department using the DENSE_RANK() function.

SQLmediumpartition0.3 min read
Bitwise
β†’
245

Find the error in the provided SQL query.

SQLmediumjoinsql0.3 min read
Grover
β†’
246

Find the second-highest salary in the employees table using three different methods.

SQLmediumwindow0.3 min read
Tredence
β†’
247

Find the third-highest salary for each department.

SQLmediumpartition0.2 min read
Freight Tiger
β†’
248

Finding nth Highest Salary within each department

SQLmediumpartition0.2 min read
Walmart
β†’
249

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

SQLmediumjoinwindow0.3 min read
Goldman Sachs
β†’
250

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

SQLmediumpartitionwindow0.2 min read
American Express
β†’
251

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

SQLmediumjoin0.2 min read
Aarete
β†’
252

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

SQLmediumjoin0.3 min read
Uber
β†’
253

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

SQLmediumjoinpartition0.3 min read
BCG
β†’
254

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
β†’
255

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
β†’
256

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

SQLmediumjoinsql0.3 min read
Morgan Stanley
β†’
257

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

SQLmediumpartition0.3 min read
Apple
β†’
258

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

SQLmediumjoin0.3 min read
JP Morgan
β†’
259

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

SQLmediumpartition0.2 min read
Dunnhumby
β†’
260

How do partitioning strategies differ between source and sink?

SQLmediumpartition0.3 min read
Virtusa
β†’

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...1112131415...24Next
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