Skip to content
Back to challenges
Company Tracks: Netflix-style and Stripe-styleConcept Challengeintermediate30 minPro

Netflix viewing events

Model one atomic viewing-events fact that answers watch-time-by-title and unique-viewers-by-device.

How this preview works
Preview this problem before signing in. Sign in to save progress and submit work.

Concept

fact-table-grain

The primary modeling idea this problem reinforces.

Requirements

0

Business needs the model must satisfy.

Read the concept guide: Fact table grain
Scenario

A streaming analytics team needs watch time by title and unique viewers by device. A teammate proposes two facts: a watch-time fact and a unique-viewers fact. The title and device dimensions already exist.

Why this matters

One atomic event fact answers many questions; splitting into a fact per metric duplicates grain decisions and makes cross-metric questions inconsistent. Unique viewers come from distinct-counting a dimension key, not from a second fact.

Requirements
    Read-only starter workspace
    Inspect the authored starting ERD, then open the workspace to edit and run the checks. Saving your progress needs a free account.

    Template

    The model users start from in the full workspace.

    Entities

    0

    Seeded tables visible in the public preview.

    Dialect

    postgresql

    Generated SQL target for this starter model.

    Mini Map

    This preview is read-only. Open the workspace to edit and verify; saving needs a free account.

    Open workspace

    Try the question first.

    The discussion has other people's approaches and solutions. Give it a real attempt before you read them.