Which of the following queries identifies customers who have ordered the same books as customers 1001 and

Question:

Which of the following queries identifies customers who have ordered the same books as customers 1001 and 1005?
a. SELECT customer# FROM orders

JOIN books USING (isbn)
WHERE isbn = (SELECT isbn FROM orderitems
JOIN books USING (isbn)
WHERE customer# = 1001 OR customer# = 1005));

b. SELECT customer# FROM orders

JOIN books USING (isbn)
WHERE isbnJOIN books USING (isbn)
WHERE customer# = 1001 OR customer# = 1005));

c. SELECT customer# FROM orders

JOIN books USING (isbn)
WHERE isbn = (SELECT isbn FROM orderitems
JOIN orders USING (order#)
WHERE customer# = 1001 OR 1005));

d. SELECT customer# FROM orders

JOIN orderitems USING (order#)
WHERE isbn IN (SELECT isbn FROM orders
JOIN orderitems USING (order#)
WHERE customer# IN (1001, 1005));

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Oracle 12c SQL

ISBN: 978-1305251038

3rd edition

Authors: Joan Casteel

Question Posted: