You join the orders table with the payments table, and the total revenue in the report suddenly grows almost threefold. How would you look for the cause, and how would you fix it?
~4 min by voice
How to approach it
The interviewer checks whether the candidate understands join fan-out (rows multiplying in a one-to-many relationship), can diagnose it step by step rather than by trial and error, and fixes it correctly, by pre-aggregating to the right grain rather than with DISTINCT.
The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.