SQL questions from Gartner data engineering interviews.
These sql questions are sourced from Gartner data engineering interviews. Each includes an expert-level answer. This set leans toward the medium-difficulty band most real interviews actually live in (10 of 15). Recurring themes are sql, join, and partition — these patterns appear most often in real interviews and reward the deepest preparation. Average answer is around 1 minute of reading — plan roughly 1 hour to work through the full set thoughtfully.
This collection contains 15 curated questions: 3 easy, 10 medium, and 2 hard. There's a strong foundation of fundamentals-focused questions — ideal for building confidence before tackling advanced topics.
The most frequently tested areas in this set are sql (7), join (7), partition (3), snowflake (2), airflow (1), and etl (1). Focusing on these topics will give you the highest return on your preparation time.
Start with the easy questions to warm up and solidify fundamentals. Medium-difficulty questions form the bulk of real interviews — spend the most time here and practice explaining your reasoning out loud. Hard questions often appear in senior and staff-level rounds; attempt them after you're comfortable with the basics. For each question, try answering before revealing the solution. Use our AI Mock Interview to simulate real interview conditions and get instant feedback on your responses.
Compare PostgreSQL vs Snowflake. How do they handle duplicate record errors?
Explain ETL process flags and segregation of steps.
Explain Union vs Union All in SQL.
Explain normalization and its disadvantages.
Explain peer code review and team lead review.
Explain the difference between a clustered and non-clustered index.
Explain the difference between a fact table and a dimension table.
Explain the difference between a primary key and a unique key.
Find average salary by department, max average salary, and list of employees for the max salary department.
How do you make data ingestion fast with 5 tables of 50k records?
How many rows result from left, right, full outer, and inner joins?
What is CTE in SQL?
Write SQL query for sum of marks grouped by student.
Write a query to get the latest rule_id and rule_status.
Write a self join query to get the manager's name for each employee.
Get full access to 1,800+ expert answers, AI mock interviews, and personalized progress tracking.