This document creates a view called vw_FactSales_Summary that summarizes fact sales data by joining four tables: FactSales, DimCalendar, DimProducts, and DimCustomer. The view selects fields from each table including date attributes from DimCalendar like day, week number, and holiday flags. It also selects product attributes like name, type, category, and price from DimProducts. Customer name is selected from DimCustomer. A calculated field for total amount sold is included by multiplying quantity by price. The view can then be queried to summarize and analyze fact sales data.
This document creates a view called vw_FactSales_Summary that summarizes fact sales data by joining four tables: FactSales, DimCalendar, DimProducts, and DimCustomer. The view selects fields from each table including date attributes from DimCalendar like day, week number, and holiday flags. It also selects product attributes like name, type, category, and price from DimProducts. Customer name is selected from DimCustomer. A calculated field for total amount sold is included by multiplying quantity by price. The view can then be queried to summarize and analyze fact sales data.
This document creates a view called vw_FactSales_Summary that summarizes fact sales data by joining four tables: FactSales, DimCalendar, DimProducts, and DimCustomer. The view selects fields from each table including date attributes from DimCalendar like day, week number, and holiday flags. It also selects product attributes like name, type, category, and price from DimProducts. Customer name is selected from DimCustomer. A calculated field for total amount sold is included by multiplying quantity by price. The view can then be queried to summarize and analyze fact sales data.
This document creates a view called vw_FactSales_Summary that summarizes fact sales data by joining four tables: FactSales, DimCalendar, DimProducts, and DimCustomer. The view selects fields from each table including date attributes from DimCalendar like day, week number, and holiday flags. It also selects product attributes like name, type, category, and price from DimProducts. Customer name is selected from DimCustomer. A calculated field for total amount sold is included by multiplying quantity by price. The view can then be queried to summarize and analyze fact sales data.
AS SELECT fss. *, cd.CalendarDay, cd.Holiday, cd.WeekNumber, p.ProductName, p.ProducType, p.Category, p.Price, c.CustomerName, (fss.Qty*Price) AS TotalAmountSold FROM [dbo].[FactSales] as fss JOIN [dbo].[DimCalendar] as cd ON fss.DateSold = cd.CalendarDate JOIN [dbo].[DimProducts] AS p ON p.ProductNo=fss.ProductNo JOIN [dbo].[DimCustomer] AS c ON c.CustomerID = fss.CustomerID