Netflix publishes a weekly Top 10 for TV shows. weekly_views has one row per title, region and week, where week_start is the Monday that starts the week. A show's weekly total is the sum of its views across all regions. Movies are ranked on a separate list and must be ignored. The #1 show of a week is the show with the highest weekly total; if two shows tie, both are #1. Write an SQL query that finds every run of at least 3 consecutive weeks in which the same show was #1. Return title_id, title_name, streak_start (the week_start of the first week in the run) and weeks_at_number_one (the length of the run). Order the results by streak_start ascending.
Loading…
Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.
Ask questions, share alternate queries, and explore solutions
Your recent query executions and answer checks
This will insert the verified MySQL solution into your editor so you can study how each clause transforms the table.