The Gap Between Neighbors
A hard SQL mock interview question on DataDriven, with an AI interviewer who asks follow-up questions and a hire or no-hire decision at the end.
- Domain
- SQL
- Difficulty
- hard
- Seniority
- L5
Interview Prompt
We monitor service health, and each row in `svc_health` is one health check with a status, a latency reading, an uptime percentage, and a region. Within a region, pair every healthy check with every other healthy check whose uptime sits within 5 percentage points of it, and for each service report the average absolute latency gap across all the pairs its checks take part in.
Summary
Same region, and still they disagree.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write and run your SQL against a real database
- Answer the interviewer's follow-up questions, then get a hire or no-hire decision