Longest Uptime Streak
A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- hard
- Seniority
- L5
Problem
Find the longest consecutive streak of 'healthy' statuses (case-insensitive) for any single service. A streak ends when the service records a non-healthy check. Return the service name and streak length.
Summary
Pass, pass, pass. How long until fail?
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.