Given the following query: SELECT DISTINCT zip, category FROM customers NATURAL JOIN orders NATURAL JOIN orderitems NATURAL

Question:

Given the following query:

SELECT DISTINCT zip, category

FROM customers NATURAL JOIN orders NATURAL JOIN orderitems

NATURAL JOIN books;

Which of the following queries is equivalent?

a. SELECT zip FROM customers

UNION

SELECT category FROM books;

b. SELECT DISTINCT zip, category

FROM customers c, orders o, orderitems oi, books b

WHERE c.customer# = o.customer# AND o.order# = oi.order#

AND oi.isbn = b.isbn;

c. SELECT DISTINCT zip, category

FROM customers c JOIN orders o

JOIN orderitems oi JOIN books b

ON c.customer# = o.customer#

AND o.order# = oi.order#

AND oi.isbn = b.isbn;

d. All of the above

e. None of the above

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: