Owner: | dbo |
Schema bound: | |
Encrypted: | |
Creation Date: | 08/06/2000 |
Description: |
Name | Data Type | Length | NULL | IsGUID | Description | |
|
CategoryName | nvarchar | 30 |
|
|
|
|
ProductName | nvarchar | 80 |
|
|
|
|
ProductSales | money | 8 |
|
|
Objects that [dbo].[Product Sales for 1997] depends on
Object Name | Owner | Object Type | Dep Level | |
|
Categories | dbo | Table | 1 |
|
Customers | dbo | Table | 1 |
|
Employees | dbo | Table | 1 |
|
Shippers | dbo | Table | 1 |
|
Suppliers | dbo | Table | 1 |
|
Orders | dbo | Table | 2 |
|
Products | dbo | Table | 2 |
|
Order Details | dbo | Table | 3 |
Objects that depend on [dbo].[Product Sales for 1997]
Object Name | Owner | Object Type | Dep Level | |
|
Category Sales for 1997 | dbo | View | 1 |
create view "Product Sales for 1997" AS
SELECT Categories.CategoryName, Products.ProductName,
Sum(CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS ProductSales
FROM (Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID)
INNER JOIN (Orders
INNER JOIN "Order Details" ON Orders.OrderID = "Order Details".OrderID)
ON Products.ProductID = "Order Details".ProductID
WHERE (((Orders.ShippedDate) Between '19970101' And '19971231'))
GROUP BY Categories.CategoryName, Products.ProductName
See Also
List of views