SQL questions from Capco data engineering interviews.
These sql questions are sourced from Capco data engineering interviews. Each includes an expert-level answer. This set leans toward the medium-difficulty band most real interviews actually live in (9 of 15). Recurring themes are partition, window, and join — these patterns appear most often in real interviews and reward the deepest preparation. Many of these questions also surface at Impetus and KPMG, so the preparation transfers across companies. 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: 5 easy, 9 medium, and 1 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 partition (8), window (2), join (1), optimization (1), etl (1), and spark (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.
Demonstrate the difference between DENSE_RANK() and RANK()
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?
Explain how you would optimize Redshift query performance for a reporting system with large fact tables.
Explain the differences between table re-creation and ALTER TABLE operations.
Explain the use of Amazon Athena for serverless querying.
Explain the use of Elastic Resize vs. Classic Resize in Redshift.
How does partitioning in S3 affect Athena query performance?
How does the MAXERROR parameter affect data loading in Redshift?
How would you add columns to a table without impacting queries?
How would you automate Redshift cluster scaling for peak loads?
How would you handle data type changes for an existing column?
How would you prevent small file problems in S3 when loading data into Redshift?
What are the benefits and drawbacks of using compression encodings in Redshift?
What metrics would trigger an auto-scaling event?
What strategies would you use to manage dynamic partitions efficiently?
Get full access to 1,800+ expert answers, AI mock interviews, and personalized progress tracking.