DataDriven
LearnPracticeInterviewDiscussDailyJobs

Intra-Region Latency Diff

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

Domain
SQL
Difficulty
hard
Seniority
L5

Problem

Each row in svc_health is a single health check, and the monitor logs status in mixed case ('Healthy', 'healthy', 'DEGRADED' and so on) where every spelling is treated as its own condition, so only checks marked exactly 'healthy' qualify. Within a region, pair every qualifying check with every other healthy check whose uptime reading sits within 5 percentage points of it, counting pairs between two different checks even when they belong to the same service. For each service (svc_name), report the average absolute latency gap across all the pairs its checks take part in.

Summary

Same region. Different latency.

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