Amazon seller conformance
Use one conformed seller dimension across orders, returns, and disputes.
Concept
conformed-dimensions
The primary modeling idea this problem reinforces.
Requirements
4
Business needs the model must satisfy.
Amazon-style prompt: marketplace operations wants a seller health view for 2.4 million active sellers. The first release must combine gross merchandise amount from order lines, refund amount from return lines, and dispute counts from support cases by seller, region, and week. Design the shared seller context without copying seller attributes into each process fact.
Cross-process performance questions fail when every process owns a lookalike seller table. A conformed seller dimension makes seller health metrics comparable across orders, returns, and disputes.
- Add one seller dimension with a surrogate key and natural seller id attribute.
- Keep orders, returns, and disputes as separate facts.
- Connect each fact to the same seller dimension through explicit foreign keys.
- Explain when seller status or region might need Type 2 history.
Template
Seller performance starter
The model users start from in the full workspace.
Entities
3
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.