What was watched, without repeats
What was watched, without repeats
You work with the data of a streaming service. Plays are written into two tables: one for the browser web player, the other for the mobile app. The product team is building a "you have already watched this" block and asks for a directory of profile-to-title facts: which profile has ever started which title. How many times they rewatched it and on which device does not matter for this directory — every pair must appear exactly once.
Return columns:
- profile_id — viewer profile id (integer);
- title_code — title code.
Sorting: by profile_id ascending, then by title_code ascending. Each profile-title pair must land in the result exactly once, no matter how many times or on how many platforms it was played.
Row order matters
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in