Code Room
System designHardsd-g179
Subject Data warehouseLevel Senior–Staff~45 minCommon in Distributed systems interviewsIndustries Technology, Software development

Question

Design the warehouse schema for a B2B SaaS analytics product where customers re-org constantly: sales reps change territories, accounts get reassigned to new owners, and pricing tiers change mid-contract. Analysts must answer both 'what is the rep's territory now' and 'what was attributed revenue under the territory as it existed when each deal closed' — i.e. correct historical truth even after re-orgs. ~50M fact rows/year, ~200k accounts, ~5k reps. Design the dimensional model and how you version dimensions so point-in-time queries are correct and fast.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.