Write a SQL query to analyze launch performance by region and week, joining content launch data with subscription and engagement tables to identify the top-performing markets.
Use the seven-day period beginning on each content launch date and treat Monday as the first day of the launch week. Return only markets whose weekly performance rank is at most 2, including ties.
week_start, region, launched_titles, subscribed_viewers, engagement_hours, and market_rank.week_start, market_rank, then region.| Column | Type | Description |
|---|---|---|
| content_idPK | INT | Unique identifier for launched content |
| region | VARCHAR(20) | Market where the content launched |
| launch_date | DATE | Content launch date in the region |
| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique subscriber identifier |
| region | VARCHAR(20) | Subscriber market |
| subscription_date | DATE | Date the subscription began |
| plan | VARCHAR(20) | Disney+ subscription plan |
| Column | Type | Description |
|---|---|---|
| engagement_idPK | INT | Unique engagement event identifier |
| user_id | INT | Subscriber associated with the event |
| content_id | INT | Content associated with the event |
| engagement_date | DATE | Date of engagement |
| engagement_minutes | INT | Minutes watched or otherwise engaged |