© Ron McFadyen1 Many-to-one-to-many We need information that can only be obtained by accessing two fact tables through a common dimension … drilling across from star to star Fact table1 … dim key … Instead of one select that accesses two stars, the recommendation is Multipass SQL each fact table is queried independently and the results combined Fact table2 … dim key … Dimension table dim key …
© Ron McFadyen2 Many-to-one-to-many Consider two stars, with one fact for actual sales and the other fact for sales forecast sales … …… … For each of Buchanan’s employees, list the sales to date and their forecasted sales Some employees may not have any sales Some employees may not have a forecast forecast … employee …
© Ron McFadyen3 Many-to-one-to-many Select … from sales, employee where … Select … from forecast, employee where … Combine sales … …… … forecast … employee …