Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

=+ (c) Show that a ,, converges to some a > 0.

Answered: 1 week ago

Question

Currency fluctuations can provide marketing opportunites

Answered: 1 week ago