Skip to content
Back to challenges
SCD DepthConcept Challengeintermediate25 min

SCD strategy per attribute

Apply Type 1, Type 2, and Type 3 choices to different attributes in one account dimension.

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

Concept

slowly-changing-dimensions

The primary modeling idea this problem reinforces.

Requirements

4

Business needs the model must satisfy.

Read the concept guide: Slowly changing dimensions: Type 2
Scenario

A SaaS revenue team uses account context for subscription analysis. Account name corrections should overwrite in place, plan tier must be historically accurate for subscription events, and sales wants current territory plus one previous territory after a realignment.

Why this matters

Real dimensions rarely use one SCD treatment for every attribute. The modeling skill is choosing the lightest history pattern that still supports each business question.

Requirements
  • Keep account id and account name on the account dimension.
  • Model plan tier with Type 2 effective dates and current-row flag.
  • Add previous_territory for the Type 3 territory requirement.
  • Connect subscription events to the account surrogate key.
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

Mixed account SCD starter workspace

The model users start from in the full workspace.

Entities

2

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.