Who Stayed
A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant feedback.
- Domain
- SQL
- Difficulty
- hard
- Seniority
- L5
Problem
Retention wants the most loyal visitors of all time: the users with the longest streaks of consecutive calendar days that had at least one session, counting only the days on or before 2026-08-10. Surface the three longest streak lengths along with every user who reached them.
Summary
Day after day after day. Who kept coming back?
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and checks it automatically.