PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Adia

Calculate Playback Counts per Stream

Last updated: Jun 5, 2026

Quick Overview

This question evaluates SQL skills in aggregation and joins, specifically counting event occurrences and relating them to stream and streamer identifiers.

  • easy
  • Adia
  • Software Engineering Fundamentals
  • Data Scientist

Calculate Playback Counts per Stream

Company: Adia

Role: Data Scientist

Category: Software Engineering Fundamentals

Difficulty: easy

Interview Round: Technical Screen

You are given two database tables: `streamer` | column | type | description | |---|---|---| | `streamer_id` | integer | Primary key of the streamer | | `streamer_name` | string | Display name of the streamer | `streaming` | column | type | description | |---|---|---| | `stream_id` | integer | Identifier of a livestream or video stream | | `streamer_id` | integer | The streamer who owns the stream | | `viewer_id` | integer | Viewer who played or watched the stream | | `played_at` | timestamp | Time of the play event | Each row in `streaming` represents one play event. Write a SQL query that returns the number of plays for every stream of every streamer. The output should include: - `streamer_id` - `streamer_name` - `stream_id` - `play_count` Order the result by `streamer_id` and then `stream_id`.

Quick Answer: This question evaluates SQL skills in aggregation and joins, specifically counting event occurrences and relating them to stream and streamer identifiers.

Adia logo
Adia
May 25, 2026, 12:00 AM
Data Scientist
Technical Screen
Software Engineering Fundamentals
0
0

You are given two database tables:

streamer

columntypedescription
streamer_idintegerPrimary key of the streamer
streamer_namestringDisplay name of the streamer

streaming

columntypedescription
stream_idintegerIdentifier of a livestream or video stream
streamer_idintegerThe streamer who owns the stream
viewer_idintegerViewer who played or watched the stream
played_attimestampTime of the play event

Each row in streaming represents one play event. Write a SQL query that returns the number of plays for every stream of every streamer.

The output should include:

  • streamer_id
  • streamer_name
  • stream_id
  • play_count

Order the result by streamer_id and then stream_id.

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Adia•More Data Scientist•Adia Data Scientist•Adia Software Engineering Fundamentals•Data Scientist Software Engineering Fundamentals
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.