Professional Documents
Culture Documents
Question 2
Select ProductName, Brand, PromotionName, Storename, SalesRegion, DollarSales, UnitSales
from
DATA_PRODUCT, DATA_PROMOTION, DATA_STORE, DATA_SALESTRANSACTIONS;
MALI AKO DITO KASI DAPAT PACIFIC NAKALAGAY SA SALESREGION EH KASO
EASTERN NAKALAGAY SA AKIN…
Question 3:
CREATE TABLE StoreInventorySnapshotFact (
SnapshotID INT GENERATED ALWAYS AS IDENTITY,
DateKey INT,
ProductKey INT,
StoreKey INT,
QuantityOnHand NUMBER(10, 2),
CONSTRAINT PK_StoreInventorySnapshotFact PRIMARY KEY (SnapshotID),
CONSTRAINT FK_StoreInventorySnapshotFact_DateKey FOREIGN KEY (DateKey)
REFERENCES DimDate (DateKey),
CONSTRAINT FK_StoreInventorySnapshotFact_ProductKey FOREIGN KEY (ProductKey)
REFERENCES DimProduct (ProductKey),
CONSTRAINT FK_StoreInventorySnapshotFact_StoreKey FOREIGN KEY (StoreKey)
REFERENCES DimStore (StoreKey)
);