Top 2 Busiest API Slots
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L4
Problem
Segment each day's API traffic into 'Morning' (before 12:00), 'Early Afternoon' (12:00 to 15:00), and 'Late Afternoon' (after 15:00). Find the top 2 day-plus-time-segment combinations by total API calls; if there's a tie, include all tied results. Exclude records with missing timestamps.
Summary
Two time slots per week. The busiest.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.