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

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));

Step by Step Solution

3.48 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

d SELECT customer FROM orders JO... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (2 attachments)

PDF file Icon

1803_60b8c1212a6a4_716711.pdf

180 KBs PDF File

Word file Icon

1803_60b8c1212a6a4_716711.docx

120 KBs Word File

Students Have Also Explored These Related Oracle 12c SQL Questions!