Question
Modify the query of part 6C to get the total order quantities per customer (sum over all the orders for each customer). Should you use
Modify the query of part 6C to get the total order quantities per customer (sum over all the orders for each customer). Should you use both first and last name? What would happen if you use only the first name and two customers have the same first name?
Now generalize the query for all customers and check how the number of returned records changes based on whether you are using only the first, only the last or both first and last names.
And this is my code from the previous question.
SELECT c.CUSTOMER_LAST_NAME, NVL(od.ORDER_QTY,0) FROM ORDER_DETAILS od INNER JOIN ORDERS o ON o.ORDER_ID = od.ORDER_ID INNER JOIN CUSTOMERS c ON c.CUSTOMER_ID = o.CUSTOMER_ID WHERE c.CUSTOMER_LAST_NAME = 'Blanca';
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