View the Exhibit and examine the descriptions of ORDER_ITEMS and ORDERS tables.

View the Exhibit and examine the descriptions of ORDER_ITEMS and ORDERS tables.


You want to display the CUSTOMER_ID, PRODUCT_ID, and total (UNIT_PRICE multiplied by QUANTITY) for the order placed. You also want to display the subtotals for a CUSTOMER_ID as well as for a PRODUCT ID for the last six months.
A. SELECT o.customer_Id, oi.productj_id, SUM(oi.unit_price*oi. quantity) "Total" FROM order_items oi JOIN orders oON oi.order_id=o.order_idGROUP BY ROLLUP (o.customer_id.oi.product_id)WHERE MONTHS_BETWEEN(order_date, SYSDATE) <= 6;
B. SELECT o.customer_id, oi.product_id, SUM(oi.unit_price*oi. quantity) "Total" FROM orderjtems oi JOIN orders oON oi.order_id=o.order_idGROUP BY ROLLUP (o.customer_id.oi.product_id)HAVING MONTHS_BETWEEN(order_date, SYSDATE) <= 6;
C. SELECT o.customer_id, oi.product_id, SUM(oi.unit_price*oi.quantity) "Total" FROM order_items oi JOIN orders oON oi.order_id=o.order_idGROUP BY ROLLUP (o.customer_id, oi.product_id)WHERE MONTHS_BETWEEN(order_date, SYSDATE) >= 6;
D. SELECT o.customer_id, oi.product_id, SUM(oi.unit_price*oi.quantity) "Total" FROM order_items oi JOIN orders oON oi.order_id=o.order_idWHERE MONTHS_BETWEEN(order_date, SYSDATE) <= 6GROUP BY ROLLUP (o.customer_id, oi.product_id);

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.