Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Data Engineer Interview: 250 SQL & Python Coding Exercises
Role Play
New

Data Engineer Interview: 250 SQL & Python Coding Exercises

Solve real pipeline problems in SQL and Python, from window functions to CDC, then explain answers in mock interviews
Created bySoundhar K
Last updated 11/2026
English

What you'll learn

  • Solve data engineering SQL questions with joins, window functions, gaps-and-islands, recursion, pivots and cohorts.
  • Write Python that cleans pipeline data: dedupe by key, normalize timestamps, flatten nested events and validate schemas.
  • Build incremental loads, upserts and change data capture logic that stay correct when a job reruns.
  • Model facts, dimensions and SCD Type 2 tables, and fix the bugs that break them.
  • Debug broken pipelines and wrong queries, from double-counted revenue to jobs that miss their window.
  • Explain your design choices in role plays: code reviews, incident reviews, system design and stakeholder calls.

Coding Exercises

This course includes our updated coding exercises so you can practice your skills as you learn.

See a demo
Image of coding exercise example

Course content

25 sections • 10 lectures • 1h 55m total length
  • Keep the Latest Record per Key
  • Normalize Timestamps to UTC ISO
  • Flatten Nested Events for a Warehouse Table
  • Fix the Bug: Incremental Load Reprocesses Rows
  • Validate Rows Against a Schema
  • Upsert Into a Target Table
  • Fix the Bug: SCD Type 2 Never Closes Old Rows
  • Find Gaps in an Order ID Sequence
  • Fix the Bug: Rerunning the Job Doubles Revenue
  • Route Bad Rows to a Dead-Letter Queue
  • Mock Interview: Explain Your Data Wrangling Choices

Requirements

  • Basic SQL (SELECT, JOIN, GROUP BY) and basic Python (functions, lists, dictionaries).
  • Nothing to install. All 250 exercises run in your browser.

Description

Data engineering interviews don't look like general coding interviews. You're more likely to be handed a table of events and asked for each user's sessions, or shown a pipeline that doubles revenue every time it reruns and asked why, than to reverse a linked list. Then someone asks how you'd make it incremental and what happens when the schema changes.

This course is 250 hands-on coding exercises in SQL and Python across 25 sections, each ending with an interview role play, plus short lectures and two practice tests. Every exercise runs in your browser and is checked automatically, so you write real code and find out straight away whether it works. SQL runs on SQLite and the Python is plain Python, so you focus on logic rather than one vendor's syntax.

What you'll practice

  • SQL: joins and aggregation, window functions, gaps-and-islands and sessions, recursion, pivots and cohorts, and a fix-the-query round.
  • Python for pipelines: latest record per key, UTC timestamps, flattening nested events, schema validation and dead-letter handling.
  • Files, formats and APIs: parsing messy inputs and ingesting data reliably.
  • Modeling: facts, dimensions and slowly changing dimensions.
  • Pipeline work: incremental loads and CDC, orchestration and reliability, streaming, partitioning and file layout.
  • Quality and governance: data testing, data contracts and schema evolution, privacy, and debugging production pipelines.
  • Performance and cost: faster Python for data, Spark-style processing patterns, and warehouse query tuning.
  • Interview extras: two sections of algorithm questions for DE screens and two mixed mock interview sets.

Many exercises are written as bugs to fix, such as an incremental load that reprocesses rows or an SCD Type 2 table that never closes old records, because that's how these problems show up at work and in interviews.

How to use the course

Work through the sections in order, or jump to your weakest topics if your interview is close. Try each exercise before looking at hints, and redo the ones you miss the next day. Do each role play out loud. Save the mock interview sets and practice tests for your final week.

Who it's for

Data engineers preparing for their next role, analysts and analytics engineers moving into data engineering, software engineers switching to data work, and new graduates targeting junior DE jobs. You should already write basic SQL and Python.

What you need

A browser. Everything runs in the course's built-in coding editor.

Who this course is for:

  • Data engineers preparing for SQL and Python coding rounds at their next job
  • Data analysts and analytics engineers moving into data engineering roles
  • Software engineers switching to data work who need pipeline and warehouse practice
  • New graduates targeting junior data engineering jobs