πŸͺ

Essential cookies keep authentication working. With your permission, we also use analytics to improve the product. Privacy Policy

DDataEngPrep.tech
Home
PricingBlog
Sign InStart Free→

Interview Questions

Real questions from top companies in SQL Β· medium

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

Compare Airflow's @daily vs once trigger scheduling.

SQLmediumairflow0.6 min read
GoogleAirbnb
β†’
42

Compare OLTP and OLAP systems in the context of financial transactions.

SQLmediumbigqueryetlpartition0.5 min read
Goldman Sachs
β†’
43

Compare PostgreSQL vs Snowflake. How do they handle duplicate record errors?

SQLmediumpartitionsnowflakesql0.6 min read
Gartner
β†’
44

Compare the star schema and snowflake schema. Which one would you use for reporting at Swiggy, and why?

SQLmediumjoinsnowflake0.5 min read
Swiggy
β†’
45

Connecting BigQuery with Linux

SQLmediumairflowbigquerypartition0.5 min read
Verizon
β†’
46

Explain CTE vs Temp Table. What are the differences and use cases?

SQLmediumjoin0.5 min read
Fractal
β†’
47

Explain Data Modeling SCD Types (Type 1, 2, 3).

SQLmediumjoin0.5 min read
EY
β†’
48

Implement a recursive query for hierarchy (employee-manager). Explain the termination guarantees, depth limits, and when a recursive CTE becomes a scalability bottleneck. What alternatives exist for graph-scale hierarchies in Spark or a data lake?

SQLmediumjoinspark0.6 min read
American Express
β†’
49

Compare Glue partition discovery with Hive MSCK/ADD PARTITION. Explain the operational and cost implications of crawler-based vs. partition-projection approaches. When does partition projection become necessary, and what are its limitations?

SQLmediumpartition0.5 min read
Capco
β†’
50

Explain how partitioning and bucketing in Hive/Spark optimize queries. What are the trade-offs in bucket count, partition cardinality, and small-file problem? When does over-partitioning or over-bucketing become counterproductive?

SQLmediumjoinpartitionspark0.6 min read
Adidas
β†’
51

Explain the concept of window functions in SQL and provide an example

SQLmediumjoinpartitionsql0.6 min read
McKinsey
β†’
52

Explain the difference between Star and Snowflake schemas. When would you choose one over the other?

SQLmediumjoinsnowflakesql0.6 min read
BCG
β†’
53

Explain the difference between partition count and query performance in Spark.

SQLmediumpartitionspark0.5 min read
Incedo
β†’
54

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

SQLmedium1 min read
Pubmatic
β†’
55

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

SQLmediumpartition2 min read
Deolite
β†’
56

Find the third-highest salary for each department.

SQLmediumpartition2 min read
Freight Tiger
β†’
57

Finding nth Highest Salary within each department

SQLmediumpartition2 min read
Walmart
β†’
58

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

SQLmediumjoin2 min read
Aarete
β†’
59

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

SQLmediumjoin2 min read
JP Morgan
β†’
60

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

SQLmediumpartition2 min read
Dunnhumby
β†’

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
Previous123456Next
Topic Hubs
All Topic Hubs (12 Competencies) β†’All 1,863+ QuestionsSQL Interview QuestionsApache Spark QuestionsPySpark QuestionsPython for Data EngineersSystem Design InterviewData Modeling & WarehousingStreaming (Kafka/Flink)SQL Window FunctionsETL Pipeline Design
Company Hubs
All Company Hubs (100+ Companies) β†’AmazonGoogleMetaDatabricksSnowflakeNetflixUberStripeMicrosoftAppleGoldman SachsAWS Engineering
Academies & Guides
All Guides & ArticlesData Engineering AcademyForward Deployed AI AcademyClient Simulation StudioApache Airflow QuestionsAzure Data EngineerBehavioral & STAR MethodCloud & Distributed Tools
AI Tools & Products
Answer Analyzer (Free)AI Mock InterviewsSQL PlaygroundATS Resume AnalyzerOffline PDF Answer VaultsMembership & Pricing
Company
About & Editorial PolicyContact UsAI DisclosureDisclaimerTerms of ServicePrivacy Policy
Β© 2026 DataEngPrep.tech. All rights reserved.
AboutBlogContactDisclaimer