You work at ReelFlow, a streaming service. The production team is launching a new series of documentary films and wants to send an announcement only to viewers who might be interested: those who have already watched at least one film in the documentary genre. Viewing history is stored in watch_history, and viewer profiles are in viewers.
Build the mailing list using an EXISTS check. Include viewers who have at least one viewing record with the genre 'documentary'. Return each viewer exactly once, regardless of how many documentaries they've watched.
Return these columns:
- viewer_id — the viewer ID;
- viewer_name — the viewer's name.
Sort by viewer_id in ascending order.
viewer_idviewer_nameShowing the first 3 rows of the sample — the full sample comes with Premium
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in