Question: GROUP BY and aggregate ( e . g . , COUNT, AVG, SUM ) . a ) Using the Products table, create a query that

GROUP BY and aggregate (e.g., COUNT, AVG, SUM).
a) Using the Products table, create a query that shows for each supplier: the SupplierID and the
number of products associated with the supplier (name this field ItemsPerSupplier).
b) Using the OrderDetails table, create a query that shows for each order the OrderID and the total
quantity sold (name this field TotalQuantity).
c) Using the OrderDetails table show for each product: (i) the ProductID, (ii) the average sales unit
price (name this field AverageUnitPrice; you can simply calculate the average for each product
across the different order detail rows and you do not need to adjust the average for the quantity
sold in each order),(iii) the total quantity sold (name this field SumOfQuantitySold), and (iv) the
number of times it has been sold (name this field NumberOfSales; you can simply calculate the
number of sales orders).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!