Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 72

Examine this partial query:

Examine this output:

Which GROUP BY clause must be added so the query returns the results shown?

    Correct Answer: D

    To achieve the result shown, the query should produce subtotals for each combination of channel type and month, as well as the grand totals for each channel type and month combination. The best way to achieve this is by using a GROUP BY clause that groups by all three fields without any additional grouping operations like ROLLUP or CUBE, which would produce more groupings than what's shown in the output. Therefore, the correct GROUP BY clause is: GROUP BY ch.channel_type, t.month, co.country_code.

Discussion
fgramosOption: D

D is the correct answer

Lee_jong_sukOption: D

D is correct, can't say about rollup

yaya32Option: A

A for me

McromeoOption: D

D is the correct answer

RonerosOption: A

Ok, out of curiosity I added the first group to see the result... 16569+124224+14539+137054 = 292386. A difference of 1?? Why? Could it have been a sum of undisplayed decimal values?

asdf123asdfrOption: A

As per my understanding from below link I think A is correct. https://www.oracletutorial.com/oracle-basics/oracle-rollup/#:~:text=The%20ROLLUP%20works%20as%20follows%3A%201%20First%2C%20calculate,to%20left.%203%20Finally%2C%20calculate%20the%20grand%20total.