Service Uptime Minutes
A medium SQL mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L5
Interview Prompt
Each alert has a fired_at timestamp and a resolved timestamp (NULL if still open). For each service, calculate the total minutes spent in an active alert state. Only consider alerts that were resolved within the first year after the service's earliest health check.
Summary
Status changed. How long was it actually up?
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your sql solution with real code execution
- Get instant feedback and a hire/no-hire decision