After joining orders with the promo codes table, the revenue total in the report came out fifteen percent higher than the accounting team's number. How would you look for the cause, and how would you fix the query?
~4 min by voice
How to approach it
The interviewer checks whether the candidate can systematically diagnose a metric discrepancy after a join: recognize fan-out caused by a non-unique key, prove the hypothesis with queries, fix it by aggregating to the right grain, and prevent a recurrence with tests in the pipeline.
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.