The Last Checkout
A medium SQL mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L4
Interview Prompt
The retention team wants to understand every user's most recent checkout. For each user in `transactions`, find the most recent date they made a purchase and how many purchase rows they had on that date (a user can show up multiple times on the same date if they bought several items). Return the date, the user id, and the count, sorted from oldest last-purchase date to newest.
Summary
Their last visit. Everything in the bag.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your sql solution with real code execution
- Get instant feedback and a hire/no-hire decision