CREATE VIEW [Sales by Category] AS 
SELECT Categories.CategoryID, Categories.CategoryName, Products.ProductName, Sum(Round([Order Details].UnitPrice * Quantity * (1 - Discount), 2)) AS ProductSales
FROM [Order Details] 
            INNER JOIN Products ON [Order Details].ProductID=Products.ProductID
            INNER JOIN Orders     ON [Order Details].OrderID = Orders.OrderID
            INNER JOIN Categories ON Products.CategoryID = Categories.CategoryID
WHERE OrderDate Between '1995-01-01 00:00:00' And '1995-12-31 00:00:00'
GROUP BY Categories.CategoryID, Categories.CategoryName, Products.ProductName
ORDER BY Products.ProductName