Loading...

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
senior

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.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.