DataDriven
LearnPracticeInterviewDiscussDailyJobs

Service Uptime Minutes

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

Domain
SQL
Difficulty
medium
Seniority
L5

Problem

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?

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