Which query would you execute?

View the Exhibit and examine the structure for the ORDERS and ORDER_ITEMS tables.
You want to display ORDER_ID, PRODUCT_ID, and TOTAL (UNIT_PRICE multiplied by QUANTITY) for all the orders placed in the last seven days.
Which query would you execute?


A. SELECT orde_id, product_id, unit_price*quantity "TOTAL" FROM order_items oi JOIN orders oON (o.order_id=oi. order_id) WHERE o.order_date>=SYSDATE-7;
B. SELECT o.order_id,oi.product_id, oi.unit_price*oi.quantity "TOTAL" FROM order_items oi JOIN orders oUSING (order_id)WHERE o.order_date>=SYSDATE-7;
C. SELECT o.order_id, oi.product_id, oi.unit_price*oi.quantity "TOTAL" FROM order_items oi JOIN orders oWHERE o.order_date>=SYSDATE-7 ON (o.order_id=oi. order_id);
D. SELECT o.order_id, oi.product_id, oi.unit_price*oi.quantity "TOTAL" FROM orde_items oi JOIN orders oON (o.order_id=oi. order_id) WHERE o. order date>=SYSDATE-7;

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.