Write SQL and Python, run instantly in your browser, and track your progress.
As a Content Strategy Manager at Netflix, you're preparing for the launch of a new "Genre Spotlight" feature on the homepage that will showcase Netflix's best original content to subscribers. The product team wants to create dynamic genre-based collections that highlight Netflix's exclusive content investments and drive subscriber engagement.
Your task is to identify currently active Netflix originals within specific genres that can be featured in these spotlight collections. The marketing team needs a curated list that includes each title's unique identifier, name, primary genre, and maturity rating to ensure appropriate content targeting and compliance with viewing guidelines.
The business requirements specify that only Netflix original content (is_original = 1) that is currently active and available for streaming (is_active = 1) should be considered. To showcase Netflix's newest and most relevant content first, the list must be sorted by release year with the most recent releases appearing first. If multiple titles were released in the same year, they should be ordered by title ID in ascending order to ensure consistent, reproducible results across different systems.
| Column Name |
|---|
As a Content Strategy Manager at Netflix, you're preparing for the launch of a new "Genre Spotlight" feature on the homepage that will showcase Netflix's best original content to subscribers. The product team wants to create dynamic genre-based collections that highlight Netflix's exclusive content investments and drive subscriber engagement.
Your task is to identify currently active Netflix originals within specific genres that can be featured in these spotlight collections. The marketing team needs a curated list that includes each title's unique identifier, name, primary genre, and maturity rating to ensure appropriate content targeting and compliance with viewing guidelines.
The business requirements specify that only Netflix original content (is_original = 1) that is currently active and available for streaming (is_active = 1) should be considered. To showcase Netflix's newest and most relevant content first, the list must be sorted by release year with the most recent releases appearing first. If multiple titles were released in the same year, they should be ordered by title ID in ascending order to ensure consistent, reproducible results across different systems.
| Column Name |
|---|
| Type |
|---|
| Type |
|---|
| title_id | INTEGER |
| title_name | TEXT |
| content_type | TEXT |
| primary_genre | TEXT |
| maturity_rating | TEXT |
| release_year | INTEGER |
| runtime_minutes | INTEGER |
| is_original | INTEGER |
| is_active | INTEGER |
| title_id | INTEGER |
| title_name | TEXT |
| content_type | TEXT |
| primary_genre | TEXT |
| maturity_rating | TEXT |
| release_year | INTEGER |
| runtime_minutes | INTEGER |
| is_original | INTEGER |
| is_active | INTEGER |
| title_id | title_name | content_type | primary_genre | maturity_rating | release_year | runtime_minutes | is_original | is_active |
|---|---|---|---|---|---|---|---|---|
| 1 | A Walk to Remember | movie | romance | TV-PG | 2023 |
| title_id | title_name | content_type | primary_genre | maturity_rating | release_year | runtime_minutes | is_original | is_active |
|---|---|---|---|---|---|---|---|---|
| 1 | A Walk to Remember | movie | romance | TV-PG | 2023 |
| title_id | title_name | primary_genre | maturity_rating |
|---|---|---|---|
| 5 | The Bachelor Party | comedy | TV-MA |
| 47 | Making a Murderer 2 | documentary | R |
| 36 | The Wedding Planner's Heart | romance | TV-MA |
| 66 | The Blacklist Continues | action |
| title_id | title_name | primary_genre | maturity_rating |
|---|---|---|---|
| 5 | The Bachelor Party | comedy | TV-MA |
| 47 | Making a Murderer 2 | documentary | R |
| 36 | The Wedding Planner's Heart | romance | TV-MA |
| 66 | The Blacklist Continues | action |
Showing first 5 of 24 rows. Active original titles sorted by release year descending.
Showing first 5 of 24 rows. Active original titles sorted by release year descending.
Your final output should be a result set that meets the following requirements:
1. Filtering:
is_original = 1).is_active = 1).2. Columns:
title_idtitle_nameYour final output should be a result set that meets the following requirements:
1. Filtering:
is_original = 1).is_active = 1).2. Columns:
title_idtitle_name| 161 |
| 161 |
| 0 |
| 0 |
| 1 |
| 1 |
| 2 | Behind the Algorithm | movie | documentary | PG | 2020 | 163 | 0 | 1 |
| 2 | Behind the Algorithm | movie | documentary | PG | 2020 | 163 | 0 | 1 |
| 3 | Stuck in the Middle | movie | comedy | TV-PG | 2018 | 154 | 0 | 1 |
| 3 | Stuck in the Middle | movie | comedy | TV-PG | 2018 | 154 | 0 | 1 |
| 4 | Threads of Fate | movie | drama | TV-MA | 2016 | 132 | 0 | 0 |
| 4 | Threads of Fate | movie | drama | TV-MA | 2016 | 132 | 0 | 0 |
| 5 | The Bachelor Party | movie | comedy | TV-MA | 2025 | 165 | 1 | 1 |
| 5 | The Bachelor Party | movie | comedy | TV-MA | 2025 | 165 | 1 | 1 |
| R |
| R |
| 29 | Cabin in the Woods | horror | TV-14 |
| 29 | Cabin in the Woods | horror | TV-14 |
primary_genreprimary_genrematurity_ratingmaturity_rating3. Ordering:
3. Ordering:
release_year in descending order (most recent first).title_id in ascending order.release_year in descending order (most recent first).title_id in ascending order.