Mockbit/#56
SQLmediumWindow functions~15m

TelecomCorp wants to analyze call quality degradation patterns across their cell...

Problem

TelecomCorp wants to analyze call quality degradation patterns across their cell tower network. For each cell tower, they want to identify consecutive time periods where call drop rates exceeded the 5% threshold, and calculate how the drop rate changed compared to the previous hour. Write a query that returns towers with their consecutive high-drop periods, showing the hour, drop rate, and the change from the previous hour's drop rate. Only include hours where the drop rate exceeded 5%, and order results by tower_id and hour.

Examples

Example 1

Example 2

Constraints
  • Return columns: tower_id, hour_timestamp, drop_rate, rate_change
  • Only include hours where drop_rate > 5.0
  • Calculate rate_change as difference from previous hour
  • Handle NULL for first occurrence per tower
  • Order by tower_id, then hour_timestamp
Reference solution

Reference solution available after you attempt the question.

Ready to solve it?

Start a session on Mockbit #56. Write your SQL, run it against real data, and get graded on correctness, efficiency, query structure, and business understanding.

Related SQL questions
← Back homemockbit.io/q/56
PrivacyTerms© 2026 Mockbit