Given Paramount streaming viewing history and content metadata tables, write a query to find the top 3 most-watched genres per region.
Treat total minutes watched as the measure of popularity. Exclude records with missing regions, missing genres, or non-positive viewing minutes. Return three genres per region, breaking equal totals alphabetically.
region, genre, total_minutes_watched, and genre_rankregion, genre_rank, then genre| Column | Type | Description |
|---|---|---|
| view_idPK | INT | Unique viewing event identifier |
| content_id | INT | Viewed content identifier |
| region | VARCHAR(50) | Viewer region |
| minutes_watched | INT | Minutes watched during the viewing event |
| Column | Type | Description |
|---|---|---|
| content_idPK | INT | Unique content identifier |
| title | VARCHAR(200) | Paramount content title |
| genre | VARCHAR(80) | Primary content genre |