SQL and data analysis interview questions
These aren’t syntax drills. With AI writing more of the SQL, the questions here test whether you can tell when a query is wrong: a revenue total that comes out 2.4 times what finance reports, a count that quietly changed when a join was added, a daily metric that shifts with the time zone.
Expect to talk through what one row of a table means, why joins fan out, how NULLs behave in filters and averages, and how you’d reconcile two numbers that should match but don’t. The skill being tested is noticing that a number is lying to you, then finding out why.
Try one now
An AI assistant wrote your monthly revenue query. It joins the orders table to the order items table, then adds up each order's total. The result is about 2.4 times what finance reports. What's gone wrong?
Free, no sign-up. The interviewer asks follow-ups on your reasoning, then rates your answer.
What the 7 questions cover
- Grain: what one row means3
- Dates, time zones and period boundaries3
- Joins and fan-out (duplicate rows)2
- Aggregation traps (averages of averages, COUNT vs COUNT DISTINCT)2
- Turning raw events into metrics2
- Reconciling numbers across sources2
- Reviewing AI-written queries2
- NULLs in filters, joins and averages1
- Window functions (ranking, running totals, deduplication)1
A question can cover more than one topic, so the counts add up to more than 7.
How the practice works
- The AI interviewer asks the question and follows up on your answer, the way an interviewer would.
- Stuck? Ask for a hint. Each one gives a little more away, so you can get unstuck without being handed the answer.
- Get a written debrief. Four ratings, each from Needs work to Interview-ready, tied to what you actually said, and what to study next.