I've been on both sides of the SQL interview table somewhere around 20 times in a single job search. The pattern is always the same: candidates know SELECT, they know JOIN, they can write a WHERE clause. Then the interviewer asks them to deduplicate a table, find missing rows, or sessionize an event stream, and the wheels come off. Not because the syntax is hard. Because candidates don't understand what each row represents before they start writing.

32% of data engineering interview questions test GROUP BY. INNER JOIN sits at 29%, PARTITION BY at 21%, ROW_NUMBER at 15%. These twelve problems cover roughly 80% of what interviewers actually ask. Master them and you're ahead of most candidates walking into a live coding round.

Want to practice these for real? Solve these problems live here with a real editor and graded solutions.

1. Customers Who Spent Over $500

The question: Given an orders table with columns customer_id, order_date, and amount, find all customers whose total spend exceeds $500. Return customer_id and total_spent, sorted by total descending.