Binge Watchers

ASKED IN INTERVIEW
4pts
Netflix

Problem Statement

Netflix content teams want to identify "Binge Watchers" to improve recommendation algorithms. A binge-watching event is defined as a user watching at least 3 different episodes of the same show on the same calendar day.

Write an SQL query to find the names of users and the shows they binged.

Rules:

  • A "binge" is 3 or more episodes of the same show_id by the same user_id on the same date.
  • Multiple binges by the same user on the same show (on different days) should only result in the user/show pair being listed once.
  • Output columns: user_name, show_name.
  • Results must be sorted by user_name in ascending order, then show_name in ascending order.
Tests your understanding of
Grouping, Filtering and Date Manipulation

Input Tables

Users
user_id(INTEGER)user_name(VARCHAR)
1Alice
2Bob
3Charlie
4David
5Eve
6Frank
Shows
show_id(INTEGER)show_name(VARCHAR)
10Stranger Things
11The Crown
12Black Mirror
13Ozark
14The Witcher
15Cobra Kai
Watch_Log
watch_id(INTEGER)user_id(INTEGER)show_id(INTEGER)episode_id(INTEGER)watch_date(TIMESTAMP)
111012026-02-10 10:00:00
211022026-02-10 11:00:00
311032026-02-10 12:00:00
421112026-02-10 09:00:00
521122026-02-10 10:00:00
631212026-02-11 15:00:00
731222026-02-11 16:00:00
831232026-02-11 17:00:00

Expected Output

user_name(VARCHAR)show_name(VARCHAR)
AliceStranger Things
CharlieBlack Mirror

Tags

MediumASKED IN INTERVIEWGroupingFilteringDate Manipulation
10-15 min
65%

Hints