Question
NEED HELP WITH SQL QUERIES Northwind Database 6) Group and aggregate (e.g., count, avg, sum): a) Using the Products table, create a query that shows
NEED HELP WITH SQL QUERIES
Northwind Database
6) Group 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 NumberOfItems).
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: the ProductID, 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), the total quantity sold (name this field SumOfQuantitySold), and the number of times it has been sold (name this field NumberOfSales).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started