Quarters Apart
A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- hard
- Seniority
- L5
Problem
The reliability team reports API latency to leadership one quarter at a time and wants to see how each quarter compares to the one before it. For the three calendar years before 2026, show every quarter in order with its average latency, the previous quarter's average, and the difference between them; if a quarter has no calls, treat its average as 120.0.
Summary
Latency trending up or down? The quarters have the answer.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.