Same-Timestamp Rows and RANGE Surprises

Concepts covered: sqlAggregateOver

'How does this perform on a billion-row table?' is the standard scale follow-up. The right answer covers three things: how window functions parallelize, what pre-aggregation buys you, and why streaming systems struggle with running totals. Nailing all three flips the verdict from hire to strong hire on this question. Window function parallelism PARTITION BY is what makes window functions scale. Each partition is computed independently, so the engine can shard the workload across cores or executors. A query with PARTITION BY account_id on a billion-row table with 10 million accounts can be split across however many workers the engine has. The bottleneck is the per-partition sort: if any single account has 50 million transactions, that worker has to sort 50 million rows alone. Hot partitions

About This Interactive Section

This section is part of the Running Totals: Intermediate lesson on DataDriven, a free data engineering interview prep platform. Each section includes explanations, worked examples, and hands-on code challenges that execute in real time. SQL queries run against a live database. Python runs in a sandboxed Docker container. Data modeling problems validate against interactive schema canvases. All content is framed around what data engineering interviewers actually test at companies like Meta, Google, Amazon, Netflix, Stripe, and Databricks.

How DataDriven Lessons Work

DataDriven combines four interview rounds (SQL, Python, Data Modeling, Pipeline Architecture) with adaptive difficulty and spaced repetition. Easy problems get harder as you improve. Weak concepts resurface until you master them. Your readiness score tracks progress across every topic interviewers test. Every lesson section ends with problems you solve by writing and running real code, not by picking multiple-choice answers.