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

DataEngPrep.tech
QuestionsPracticeAI CoachDashboardPricingBlog
ProLogin

Interview Questions

Real questions from top companies in SQL

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

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

Explain bloom filters in Spark: how they reduce I/O and when they introduce false positives that hurt performance. What are the scalability and cost implications of enabling dynamic partition pruning and bloom filter pushdown at petabyte scale?

SQLhardjoinoptimizationpartition0.5 min read
American Express
β†’
83

Design a star schema for retail analytics (e.g., Adidas). Explain the dimensional modeling choices, SCD strategy, and how you would scale this schema for global multi-currency, multi-region deployments. What are the refresh and storage cost implications?

SQLhardjoinoptimizationpartition3.6 min read
Adidas
β†’
84

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

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

Explain the Medallion Architecture (Bronze, Silver, Gold).

SQLhardjoinoptimizationpartition3.6 min read
Databricks
β†’
87

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

SQLmediumjoinpartitionsql0.6 min read
McKinsey
β†’
88

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

SQLmediumjoinsnowflakesql0.6 min read
BCG
β†’
89

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

SQLmediumpartitionspark0.5 min read
Incedo
β†’
90

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

How do you design a scalable and fault-tolerant data warehouse on a cloud platform?

SQLhardjoinoptimizationpartition3.6 min read
HashedIn
β†’
92

How would you design a data model for an e-commerce platform?

SQLhardjoinoptimizationpartition3.6 min read
Swiggy
β†’
93

How would you handle data type changes for an existing column?

SQLmediumwindow0.8 min read
Capco
β†’
94

How would you handle duplicate or corrupted data in a batch ETL job?

SQLmediumetlpartitionspark0.7 min read
Adidas
β†’
95

How would you handle null values in a dataset, especially in a single column?

SQLeasy0.7 min read
Infosys
β†’
96

How would you handle nulls in a SQL join? Provide examples using COALESCE.

SQLmediumjoinsql0.7 min read
Bristol Myers Squibb
β†’
97

How would you identify duplicate records based on a composite key in SQL?

SQLmediumpartitionsqlwindow0.8 min read
Amazon
β†’
98

How would you optimize a SQL query for better performance when working with large datasets?

SQLhardjoinoptimizationpartition0.7 min read
Tredence
β†’
99

How would you optimize a query fetching sales data across multiple countries with billions of rows?

SQLmediumbigquerypartitionsnowflake0.6 min read
Adidas
β†’
100

How would you optimize a query with multiple joins and subqueries?

SQLmediumjoin0.7 min read
American Express
β†’

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...345678Next
Categories
All QuestionsSQLSpark / Big DataPython / CodingSystem DesignCloud / ToolsBehavioral
By Company
AmazonGoogleDatabricksSnowflakeAWSAzureMicrosoftNetflixUberTCS
Interview Guides
All GuidesTop SQL QuestionsTop Spark QuestionsPySpark QuestionsTop Python QuestionsTop System DesignKafka QuestionsAirflow QuestionsSQL Window FunctionsETL QuestionsData Modeling
Products
AI Interview CoachAnswer AnalyzerSQL PlaygroundResume AnalyzerAnswer Vault PDFsPricing
Company
About & Editorial PolicyContact UsAI DisclosureDisclaimerTerms of ServicePrivacy Policy
Β© 2026 DataEngPrep.tech. All rights reserved.
AboutBlogContactDisclaimer