Stripe MRR snapshots
Model a monthly MRR periodic snapshot joined to a Type 2 plan dimension so plan changes are reflected per period.
Concept
slowly-changing-dimensions
The primary modeling idea this problem reinforces.
Requirements
0
Business needs the model must satisfy.
Finance needs monthly recurring revenue per account, with plan price and tier reflected as they were each month. Plans change price over time. The account and plan dimensions exist; the plan dimension overwrites price in place.
MRR is state observed monthly, a periodic snapshot. Joined to a Type 2 plan, each month reflects the plan version then in effect; overwriting the plan rewrites history.
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.
This preview is read-only. Open the workspace to edit and verify; saving needs a free account.
Open workspaceTry the question first.
The discussion has other people's approaches and solutions. Give it a real attempt before you read them.