A challenge design question -
05-19-2005
, 11:45 AM
Fast food chain store (Think the likes of Burger King or McDonald's). Items
are sold separately or combined. Need to know, for each item sold, what are
the ratios that any other items are sold in the same transaction.
For example, one day during 5-6PM, 200 Cokes were sold in 160 transactions
(orders). 75 of them were part of the combo's. Within those 160
transactions, there also sold 140 cheese burgers, 130 French fries (85 of
them were part of the combo's), . That is, in that time period, 200 Cokes
were sold in transaction that also sold 85 French fries in combo, 45 French
fries not in combo; 140 cheese burgers, etc. The data warehouse is to
provide information like: at 8-9AM, 234 Fries were sold in transaction that
also sold 48 Cokes and 93 Coffee; at 7-8PM 435 Fries were sold in
transactions that also have 238 Cokes and 49 Diet Coke, and so on. Business
calendar, store structure, and order size (how much per order) are other
dimensions. It's like a crosstab query, plus drill up/down capabalities with
date/time, store, and etc...
There are hundreds of items in tens of categories. So, what the best way to
design this?
A fact table like:
OrderDateTime DATETIME,
StoreID INT,
OrderID INT,
ProductItemID INT,
PartOfCombo BIT,
ItemAmount INT
Then how do I build cudes and queries to get the results? Help please!
Thanks a lot!
DNG |