Which combination of subtotals do you expect to be returned by the query?

Posted by: Pdfprep Category: E20-007 Tags: , ,

Review the following code:

SELECT pn, vn, sum(prc*qty)

FROM sale

GROUP BY CUBE(pn, vn)

ORDER BY 1, 2, 3;

Which combination of subtotals do you expect to be returned by the query?
A . (pn, vn)
B . ( (pn, vn), (pn) )
C . ( (pn, vn) , (pn), (vn) )
D . ( (pn, vn) , (pn), (vn) , ( ) )

Answer: D

Leave a Reply

Your email address will not be published.