SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

Top Titles by Watch Time (Deduplicated)

Unsolved

Netflix's playback pipeline sometimes delivers the same watch event more than once, and a later delivery may carry a corrected seconds_watched value. Rows that share an event_id describe the same viewing event, and only the row with the latest ingested_at should count (if ingested_at is tied, the higher row_id wins). Events can also arrive late, so ingested_at may be days after event_time. A late event still counts for the week in which it happened (event_time). Write an SQL query that returns the top 3 titles by total seconds watched for events whose event_time is on or after 2025-06-02 00:00:00 and before 2025-06-09 00:00:00. Return title_id and total_seconds. Break ties by the smaller title_id. Order the results by total_seconds descending, then title_id ascending.

SQL Query Editor (Ctrl+Enter to run)
0 characters · Valid
Canonical Solution Official

Official Solution is Hidden

Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.

Community Q&A & Discussion

Ask questions, share alternate queries, and explore solutions

0 comments
Asked By:
🏢 Netflix

Submission History

Your recent query executions and answer checks

Execution Pipeline:
FROM watch_events
Full source dataset
11 rows total
Ready. Type a query to see live execution.
Clause: Auto-Sync · AlaSQL Engine