Netflix is launching a new movie: design a pipeline to measure its success. Which tables do you need and which metrics would you track? Then write SQL against a movie table and a user table.
Asked in the phone screen stage. Three SQL questions were covered in 30 minutes. For the SQL portion, use the provided movies and users tables and evaluate viewing activity during each movie's first 30 days.
movie_id, title, unique_viewers, total_watch_minutes, avg_completion_pct, completed_viewers, and avg_rating.movie_id ascending.| Column | Type | Description |
|---|---|---|
| movie_idPK | INT | Unique movie identifier |
| title | VARCHAR(200) | Movie title |
| launch_date | DATE | Netflix release date |
| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user viewing record identifier |
| movie_id | INT | Movie associated with the viewing record |
| watched_at | DATE | Date of viewing activity |
| watch_minutes | INT | Minutes watched |
| completion_pct | NUMERIC(5,2) | Percentage of the movie watched |
| rating | NUMERIC(2,1) | User rating from 1 to 5 |