Suppose a market shopping data warehouse consists of four dimensions: customer, date, product and store and two measures: count and avg_sales, where avg_sales stores the real sales in dollar at lowest level but the corresponding average sales at other levels.
(i) Draw the star schema diagram (sketch it, do not have to mark every possible level, and make your implicit assumptions on the levels of dimension when you draw it).
(ii) If one also wants to compute standard deviation as a measure, what other intermediate measures need to be introduced to make the computation efficient?