The Weight of Everything Before
A medium SQL mock interview question on DataDriven, with an AI interviewer who asks follow-up questions and a hire or no-hire decision at the end.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- mid
Interview Prompt
The lifecycle analytics team is studying how each customer's spend accumulates over their lifetime on the platform, because value models need the full trajectory of a buyer rather than a single snapshot. For every purchase, return the customer, the date of that purchase, and that customer's cumulative spend as it stood at that moment.
Summary
Every purchase carries the ones that came before it. Trace the climb.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write and run your SQL against a real database
- Answer the interviewer's follow-up questions, then get a hire or no-hire decision