Smooth Latency
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L5
Problem
Some of our API endpoints look like they are drifting slower as traffic grows, and we want the underlying trend rather than the per-call noise. For each endpoint, walk its calls from oldest to newest (breaking ties by call_id) and, at each call, report the average latency across that call and every earlier one, skipping any call with no recorded latency.
Summary
Noisy latency readings, smoothed into a trend you can trust.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.