dbo.Sales by Category | [Back to Details]
    create view "Sales by Category" AS
    SELECT Categories.CategoryID, Categories.CategoryName, Products.ProductName,
    	Sum("Order Details Extended".ExtendedPrice) AS ProductSales
    FROM 	Categories INNER JOIN
    		(Products INNER JOIN
    			(Orders INNER JOIN "Order Details Extended" ON Orders.OrderID = "Order Details Extended".OrderID)
    		ON Products.ProductID = "Order Details Extended".ProductID)
    	ON Categories.CategoryID = Products.CategoryID
    WHERE Orders.OrderDate BETWEEN '19970101' And '19971231'
    GROUP BY Categories.CategoryID, Categories.CategoryName, Products.ProductName
    --ORDER BY Products.ProductName