Which three statements are true regarding the output of this SQL statement?

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 order_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.)

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 order_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.)

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.

B.
It would return the subtotals for the Order Amount of every PRODUCT_ID and CUSTOMER_ID as one group.

C.
It would return the subtotals for the Order Amount of every CUSTOMER_ID and PRODUCT_ID as one group.

D.
It would return only the grand total for the Order Amount of every CUSTOMER_ID and PRODUCT_ID as one group.



Leave a Reply 6

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


kongo

kongo

A, B, C are correct.

D is not correct. ‘It would return ONLY the grand total’ NOT TRUE!

user

user

SELECT deptno,job, count(job)
FROM emp
GROUP BY cube( deptno, job);

TNK

TNK

yeh…A,B,C are correct

Dhiraj

Dhiraj

I think Options are like this:

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.
C.It would return the subtotals for the Order Amount of every PRODUCT_ID and CUSTOMER_ID as one group.
D.It would return the subtotals for the Order Amount of every CUSTOMER_ID and PRODUCT_ID as one group.
E.It would return only the grand total for the Order Amount of every CUSTOMER_ID and PRODUCT_ID as one group.

And then answer is A,B & D

Marian

Marian

indian english is cool

Marian

Marian

A,B,E if you speak indian