SELECT EmployeeID, MAX([Order Details].UnitPrice
* [Order Details].Quantity) AS LargestOrder,
MIN([Order Details].UnitPrice * [Order
Details].Quantity) AS SmallestOrder,
AVG([Order Details].UnitPrice * [Order
Details].Quantity) AS AverageOrder
FROM Orders
INNER JOIN [Order Details]
ON Orders.OrderID = [Order Details].OrderID
GROUP BY EmployeeID
ORDER BY EmployeeID
EmployeeID LargestOrder SmallestOrder AverageOrder
---------- ------------ ------------- ------------
1 15810.0000 10.0000 585.9237
2 15810.0000 4.8000 737.5487
3 9903.2000 9.6000 663.7112
|