Examine this partial query:
Examine this output:
Which GROUP BY clause must be added so the query returns the results shown?
Examine this partial query:
Examine this output:
Which GROUP BY clause must be added so the query returns the results shown?
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.
D is the correct answer
D is correct, can't say about rollup
A for me
D is the correct answer
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?
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.