A streaming platform wants to identify content that's experiencing 'viewership...
A streaming platform wants to identify content that's experiencing 'viewership momentum' - shows where each episode has more total watch time than the previous episode in the series. Write a query to find all episodes that have higher total watch time than their immediately preceding episode within the same series. Include the series title, episode number, current episode watch time, previous episode watch time, and the momentum percentage increase. Only include episodes where there is actually a previous episode to compare against.
Example 1
Example 2
- ›Return columns: series_title, episode_number, current_watch_time, previous_watch_time, momentum_percentage
- ›Only include episodes that have higher watch time than the previous episode
- ›Calculate momentum_percentage as ((current - previous) / previous * 100) rounded to 2 decimal places
- ›Order by series_title, then episode_number
Reference solution available after you attempt the question.
Ready to solve it?
Start a session on Mockbit #46. Write your SQL, run it against real data, and get graded on correctness, efficiency, query structure, and business understanding.
- #55AdMetrics Agency manages digital advertising campaigns across multiple channelsmedium
- #56TelecomCorp wants to analyze call quality degradation patterns across their cell...medium
- #57A hedge fund tracks daily portfolio performance across multiple trading...medium
- #41You're analyzing user engagement for a social media platformeasy
- #42A video streaming platform tracks user viewing sessionshard