AVG(COALESCE(rating, 0)) invents ratings nobody gave.
AVG(rating) already skips NULLs. COUNT(*) - COUNT(rating) is your missing count. A product with only NULL ratings? Leave the average NULL.
leetdata.ai/problems/null-sa… #SQL
6 warehouse incidents for a Snowflake or BigQuery round:
a 900M-row join, a remote spill, a full scan that used to prune, cluster or not, a backfill that froze dashboards, the Monday 9am pileup.
All free:
leetdata.ai/paths/warehouse #Snowflake
9 Spark incidents an interviewer can hand you:
driver OOM, death by caching, skewed-join OOM, GC thrash, 199 of 200 tasks done, partition count, AQE, accidental cartesian, broadcast vs sort-merge.
All 9 free:
leetdata.ai/paths/spark #ApacheSpark
One Kafka partition goes quiet and every event-time window stops firing.
The watermark is the min across partitions, so it stalls and state grows.
Fix: withIdleness() on the Flink WatermarkStrategy.
leetdata.ai/paths/streaming #Flink
8 SQL problems on reading less data:
partition pruning
predicate pushdown
filter before join
aggregate before join
broadcast the small side
GROUP BY, not DISTINCT
no cartesian joins
window, not self-join
Free: leetdata.ai/problems #SQL
3
494
Moved Pune to Bengaluru in June. The March order must still show Pune. Which design?
A) UPDATE the address
B) New row per move, with dates
C) Join on is_current
D) previous_address column
Reply A-D.
leetdata.ai/modeling/scd-add… #SQL
1
2
357
ROWS BETWEEN 6 PRECEDING counts 7 rows, not 7 days. Skip a day of sales and your "weekly" sum reaches back weeks.
Use RANGE BETWEEN INTERVAL 6 DAY PRECEDING AND CURRENT ROW.
leetdata.ai/problems/range-f… #SQL
4
470
The schema rule each app tests in a modeling round:
Ride-hailing: 2 FKs to one locations table
Payments: append-only events
Hotel: no overlapping stays per room
Social: UNIQUE (follower_id, following_id)
leetdata.ai/modeling #DataEngineering
5
511
Should list customers who never ordered. Returns 0 rows. Why?
WHERE id NOT IN (SELECT cust_id FROM orders)
A) Subqueries not allowed
B) NULLs in cust_id
C) Needs DISTINCT
D) Needs a cast
Reply A-D.
leetdata.ai/problems/not-in-… #SQL
341
Daily report says 1 order on a day nobody ordered.
calendar LEFT JOIN orders, then COUNT(*). The empty day still has its calendar row, so COUNT(*) = 1.
COUNT(o.order_id) gives 0.
leetdata.ai/problems/calenda… #SQL
2
3
457
9 SQL topics, one problem each:
casting, % of total, 2nd highest salary, semi join, top 2 per group, crosstab, 15-min buckets, sentinel NULLs, new vs returning users.
The one that stalls you is this week's topic.
leetdata.ai/problems
#SQL
4
340
Same room, bookings a and b. Which WHERE catches every overlap?
A) a_in BETWEEN b_in AND b_out
B) a_in < b_out AND b_in < a_out
C) a_in = b_in
D) a_out > b_in
Reply with a letter.
leetdata.ai/problems/date-ra… #SQL
269
Data Engineering Weekly is on WhatsApp.
You get the weekly issue, SQL interview problems in order, and system design questions from real company write-ups.
A channel, not a group. Your number stays hidden.
whatsapp.com/channel/0029Va9…
2
449
Two jobs append to one Iceberg table from snapshot 41. A commits first. B:
A) overwrites A's files
B) retries on the new snapshot, both land
C) breaks it till compaction
D) forks into 2 snapshots
leetdata.ai/paths/lakehouse
#dataengineering
8 join problems, in order:
inner, LEFT + IS NULL, anti-join, NOT IN + NULL trap, full outer, multi-condition, date range, many-to-many.
Number 4 returns zero rows, no error.
Free, in the browser:
leetdata.ai/problems
#SQL #dataengineering
Switching into data engineering? The interview won't stop at one SQL question.
Start each one free on leetdata.ai:
1. SQL & PySpark in your browser
2. Data modeling canvas
3. 45-min AI mock interview
4. Kafka & Spark cohorts
leetdata.ai
#dataengineering
1
8
791
Claude now builds live dashboards from raw data.
DEW #292's take: dashboards stay. They're how a company agrees on its numbers. BI tools feel it.
Who owns a dashboard nobody wrote SQL for?
dataengineeringweekly.com/p/…
#bi
1
3
579
5 rows: 'a', '', ' ', NULL, 'b'
COUNT(*) = ?
COUNT(col) = ?
COUNT(NULLIF(TRIM(col), '')) = ?
Answer before you run it.
leetdata.ai/problems/blank-v…
#sql
1
4
695
Parquet is how columnar data sits on disk.
Arrow is how it sits in memory.
Engines that share Arrow pass data with zero copies, no serialization step.
From Hoyt Emerson's overview in DEW #292. Practice:
leetdata.ai/paths/lakehouse
#dataengineering
eBay monitors 2.6B listings without slowing the fee path.
Write a tiny event ID to a local ring buffer. Add 250 columns of context later in ClickHouse.
Keep the hot path small.
dataengineeringweekly.com/p/…
#systemdesign
7
429

