Data Modelling · Lesson 6 of 6 · 20 min
Mini project: revenue by where customers really lived
Join facts to the version of the customer that was true on the day of each order.
The shop's owner wants revenue by city for 2026. For most customers the city never changed, but for the 45 customers in the history table it did. The correct answer uses the city each customer lived in on the day of the order: a point-in-time join.
The pattern: join the fact to the SCD2 dimension on the key, and on the order date falling inside the version's valid range.