nerdexam
Oracle

1Z0-047 · Question #87

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…

The correct answer is D. SELECT o.customer_id, oi.product_id, SUM(oi.unit_price*oi.quantity) "Total" FROM order_items oi JOIN. See the full explanation below for the reasoning.

Question

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. Which SQL statement would you execute to get the desired output?

Exhibit

1Z0-047 question #87 exhibit

Options

  • ASELECT o.customer_id, oi.product_id, SUM(oi.unit_price*oi.quantity) "Total" FROM order_items oi JOIN
  • BSELECT o.customer_id, oi.product_id, SUM(oi.unit_price*oi.quantity) "Total" FROM order_items oi JOIN
  • CSELECT o.customer_id, oi.product_id, SUM(oi.unit_price*oi.quantity) "Total" FROM order_items oi JOIN
  • DSELECT o.customer_id, oi.product_id, SUM(oi.unit_price*oi.quantity) "Total" FROM order_items oi JOIN

How the community answered

(31 responses)
  • A
    13% (4)
  • B
    3% (1)
  • C
    10% (3)
  • D
    74% (23)

Community Discussion

No community discussion yet for this question.

Full 1Z0-047 Practice