Question: SQL Northwind 10) INNER JOINS: Join three tables: Using the OrderDetails, OrderHeaders, and Products tables, determine for each product the average price received in 2019
SQL Northwind
10) 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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
