Who Stayed
A hard 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
- hard
- Seniority
- L5
Interview Prompt
A month with no session breaks a streak, and only January through June of 2026 counts. From `user_sessions`, give every user active in that window their longest run of back-to-back months with at least one session, plus a standing based on that streak length.
Summary
Day after day after day. Who kept coming back?
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