View SQL Query

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

View SQL Query

CREATE VIEW vw_FactSales_Summary


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

SELECT *FROM vw_FactSales_Summary

You might also like