Question: SQL question: 7b. select od.orderId, oh.orderDate, od.productId, od.quantity from orderHeaders oh join orderDetails od on oh.orderId = od.orderId where orderDate between '2019-01-01' and '2019-12-31'; 8)
SQL question:
7b. select od.orderId, oh.orderDate, od.productId, od.quantity
from orderHeaders oh
join orderDetails od
on oh.orderId = od.orderId
where orderDate between '2019-01-01' and '2019-12-31';
8) INNER JOIN: a) Copy and paste query 7.b and edit the query to only show two columns: (1) each ProductID and (2) for each product show a new calculated field named SumOfQuantitySoldIn2019 defined as the total quantity sold in 2019. Store this query as a view called ProductSales2019. b) Query the ProductSales2019 view that you created in 8.a to only show products with SumOfQuantitySoldIn2019 less than 50. Do not modify the view (only query the view from the SQL editor similar to how you query a table).
I need help with 8a and 8b
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
