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
d SELECT customer FROM orders JO... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
1803_60b8c1212a6a4_716711.pdf
180 KBs PDF File
1803_60b8c1212a6a4_716711.docx
120 KBs Word File
