SQL · Python · Data SystemsData Engineering Interview Lab
Solve SQL and Python tasks. Diagnose pipeline failures. Design reliable data systems.
Data Engineer path ↗
24 exercises
SQL
Daily revenue from changing delivery events
Deduplicate updates before calculating daily revenue.
SQL windowsDeduplication
SQL
Users active on seven consecutive days
Find streaks without counting repeated events as extra days.
SQL windowsDates
Python
Flatten nested source records
Convert nested dictionaries into safe dotted paths.
Python dictionariesRecursion
Python
Repair a replayed incremental load
Keep the newest version, including deletion tombstones.
IdempotencyCDC
Data modeling
Booking metrics with changing property details
Choose table grain and preserve the history behind a metric.
Dimensional modelingSCD
System design
Delivery analytics with late and repeated events
Serve live operations and corrected finance reports from one event history.
StreamingEvent time
Debugging
A Spark join has one task that never finishes
Use task evidence to distinguish skew from insufficient compute.
Spark plansSkew
System design
Migrate a live reporting dataset
Connect a consistent snapshot to ongoing changes without losing records.
CDCMigration
SQL
Action counts without duplicate joins
Join event tables without multiplying the result.
JoinsDeduplication
SQL
Estimate time spent on each page
Use the next event while acknowledging what the logs cannot tell you.
LEADEvent ordering
SQL
Prices that rise every month
Check strict growth and calendar continuity together.
LAGDate continuity
SQL
A checkout funnel in the right order
Count users who actually progressed through the stages.
Funnel analysisOrdered events
SQL
Accounts that disagree after migration
Find missing, extra, and changed records even when counts match.
ReconciliationNULL handling
SQL
Top visitors with tied activity counts
Rank distinct-page counts while preserving ties.
DENSE_RANKDistinct counts
Python
Median values by region
Group records and handle odd and even sample sizes explicitly.
GroupingMedian
Python
Distinct accounts in time ranges
Apply half-open interval boundaries without double-counting activity.
IntervalsDistinct counts
Python
Reconcile account balances across formats
Compare normalized records, not aggregate totals.
ReconciliationDecimal arithmetic
Python
Separate valid events from bad input
Validate an ingestion batch without losing the evidence for rejected rows.
Data qualityJSON parsing
Debugging
A revenue view doubles its totals
Find the table-grain defect before changing SUM.
Join cardinalitySQL debugging
Debugging
A successful backfill writes today’s partition
Separate the processing interval from the wall clock.
OrchestrationBackfills
Debugging
A Spark job reads thousands of tiny files
Distinguish file listing and task overhead from a hot key.
Spark scansSmall files
Data modeling
A warehouse for orders, returns, and refunds
Use separate fact grains for events that can happen more than once.
Fact grainDimensional modeling
System design
Consistent ratings from multiple providers
Resolve identity and rating scales without silently merging different items.
Entity resolutionNormalization
System design
Fresh dashboards without rebuilding everything
Choose materializations from query patterns, correction rules, and refresh cost.
MaterializationsWarehouse serving