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
Your team is investigating whether certain API endpoints are getting slower over time. For every row in api_calls where latency is not NULL, compute a running average of latency partitioned by endpoint and ordered by call_time, covering all calls up to and including the current one. Return endpoint, latency, and running_avg.
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.