Response Buckets
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L5
Problem
The performance team wants API calls bucketed by latency. For each row in api_calls with a non-NULL latency, label it 'fast' when latency is under 100, 'normal' when latency is between 100 and 500 inclusive, and 'slow' when latency is above 500. Return the endpoint, latency, and that label.
Summary
Fast, normal, or slow. Every API call gets a verdict.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.