Returning Buyers
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
- L4
Interview Prompt
Each row of `transactions` is one purchase with its `user_id` and `transaction_date`. A purchase brought its buyer back when the same user bought again within a week; list those purchases as the user and the date of the earlier one.
Summary
They came back and bought again.
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