Repeat Purchases Within a Week
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
- L5
Interview Prompt
We keep a log of customer transactions, each with a user and a purchase date. Find the users who bought at least twice within any 7-day span during 2026, returning each user's ID.
Summary
They bought again within seven days.
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