Netflix
Interview Core Track · Easy · 15 min
8. Analyzing Netflix User Behavior and Content Ratings
You're a Data Analyst at Netflix, you have been asked to analyze customer behavior and their content ratings. You have the following two tables: A users tabl...
Company labels are directional practice context, not official interview guidance.
Objective
Practice joins through a Netflix-tagged business scenario.
Approach
Use this track to improve speed, edge-case handling, and accuracy under timed conditions.
Company context
Company labels are directional practice context, not official interview guidance.
You're a Data Analyst at Netflix, you have been asked to analyze customer behavior and their content ratings. You have the following two tables: A users table that has information about users, their ID and their subscription_starts. A reviews table that has information about what content each user has reviewed and the score they gave. **Write a SQL query to analyze the data and find the average rating for each content**, sorted by the average rating in descending order. users **Example Input:** user_id subscription_starts ------------------------------ 1 2018-01-01 2 2019-02-20 3 2017-07-14 4 2020-11-28 5 2018-04-24 reviews **Example Input:** review_id user_id date content_id rating ---------------------------------------------------- 101 1 2022-06-08 1 4 202 2 2022-06-10 2 4 303 3 2022-06-18 1 3 404 1 2022-07-26 2 3 505 5 2022-07-05 1 2 **Answer:** SELECT r.content_id, AVG(r.rating) AS avg_rating FROM users u JOIN reviews r USING(user_id) GROUP BY 1 ORDER BY 2 DESC ---
users
reviews
SQL workspace
Run queries against the protected question data, then submit once the result shape looks right.
Sign in to run SQL
Create a free account or sign in before running queries against protected question data.