Loading...
Response Buckets
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
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.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.