DataDriven
LearnPracticeInterviewDiscussDailyJobs

Longest Visit Streaks

A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.

Domain
SQL
Difficulty
hard
Seniority
L5

Problem

Retention wants the most loyal visitors of all time, defined as the users with the longest streaks of consecutive calendar days with at least one session, ending on or before 2026-08-10. Surface the top three streak lengths and every user who achieved them. If multiple users tie for one of those top streak lengths, include all of 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 grades it automatically.

Related

  • All Practice Problems
  • Mock Interview Mode
  • SQL Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons