Oracle
1Z0-047 · Question #159
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 correct answer is D. SELECT o.order_id, oi.product_id, oi.unit_price*oi.quantity "TOTAL" FROM order_items oi JOIN orders o. See the full explanation below for the reasoning.
Question
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?
Exhibit
Options
- ASELECT order_id, product_id, unit_price*quantity "TOTAL" FROM order_items oi JOIN orders o
- BSELECT o.order_id,oi.product_id, oi.unit_price*oi.quantity " TOTAL" FROM order_items oi JOIN orders o
- CSELECT o.order_id, oi.product_id, oi.unit_price*oi.quantity "TOTAL" FROM order_items oi JOIN orders o
- DSELECT o.order_id, oi.product_id, oi.unit_price*oi.quantity "TOTAL" FROM order_items oi JOIN orders o
How the community answered
(45 responses)- A11% (5)
- B7% (3)
- C2% (1)
- D80% (36)
Community Discussion
No community discussion yet for this question.
