Write a SQL query to find the top 3 regions by network downtime, partitioned by month.
Use completed downtime events only. Calculate each event's duration in minutes and assign it to the month in which it started. Return the three highest-downtime regions for each month, with deterministic ordering for ties.
Output
- One row per selected region and month
- Columns:
month, region_name, total_downtime_minutes, and region_rank
- Include only ranks 1 through 3, ordered by month ascending, rank ascending, and region name ascending