Question
INNER JOINS: Join three tables Using the OrderDetails, OrderHeaders, and Products tables, determine for each product the average price received in 2019 and compare this
INNER JOINS: Join three tables Using the OrderDetails, OrderHeaders, and Products tables, determine for each product the average price received in 2019 and compare this amount to the list price (the unit price in the Products table). In your output display (i) ProductID, (ii) AveragePriceReceived (i.e., average sales unit price in 2019 for each product where sales unit price is UnitPrice*(1-Discount) from the OrderDetails table), (iii) UnitPrice from the products table, and (iv) a new calculated field that calculates the percentage difference between AveragePriceReceived and the UnitPrice in the products table. Name this field PercentPriceDifference.
What is the query statement in SQL for this one?
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