1Z0-047 · Question #178
View the Exhibit and examine the descriptions for ORDERS and ORDER_ITEMS tables. Evaluate the following SQL statement: SELECT o.customer_id, oi.product_id, SUM(oi.unit_price*oi. quantity) "Order…
The correct answer is A. It would return the subtotals for the Order Amount of every CUSTOMER_ID. B. It would return the subtotals for the Order Amount for every PRODUCT_ID. D. It would return the subtotals for the Order Amount of every CUSTOMER_ID and PRODUCT_ID as. See the full explanation below for the reasoning.
Question
View the Exhibit and examine the descriptions for ORDERS and ORDER_ITEMS tables. Evaluate the following SQL statement:
SELECT o.customer_id, oi.product_id, SUM(oi.unit_price*oi. quantity) "Order Amount" FROM orde_items oi JOIN orders o ON oi.order_id = o.order_id GROUP BY CUBE (o.customer_id, oi.product_id); Which three statements are true regarding the output of this SQL statement? (Choose three.)
Options
- AIt would return the subtotals for the Order Amount of every CUSTOMER_ID.
- BIt would return the subtotals for the Order Amount for every PRODUCT_ID.
- CIt would return the subtotals for the Order Amount of every PRODUCT_ID and CUSTOMER_ID as
- DIt would return the subtotals for the Order Amount of every CUSTOMER_ID and PRODUCT_ID as
- EIt would return only the grand total for the Order Amount of every CUSTOMER_ID and PRODUCT_ID
How the community answered
(29 responses)- A76% (22)
- C7% (2)
- E17% (5)
Community Discussion
No community discussion yet for this question.