exam questions

Exam 1z0-071 All Questions

View all questions & answers for the 1z0-071 exam

Exam 1z0-071 topic 1 question 72 discussion

Actual exam question from Oracle's 1z0-071
Question #: 72
Topic #: 1
[All 1z0-071 Questions]

Examine this partial query:

Examine this output:

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

  • A. GROUP BY ch.channel_type, ROLLUP(t.month, co.country_code);
  • B. GROUP BY ch.channel_type, t.month, ROLLUP(co.country_code);
  • C. GROUP BY CUBE(ch.channel_type, t.month, co.country_code);
  • D. GROUP BY ch.channel_type, t.month, co.country_code;
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
acd3ea6
3 months, 3 weeks ago
Selected Answer: A
create table channels_order ( channel_type varchar2(50), month date, code varchar2(5), sales number); insert into channels_order values('internet','2009-09','GB',16569); insert into channels_order values('internet','2009-09','US',124224); insert into channels_order values('internet','2009-10','GB',14539); insert into channels_order values('internet','2009-10','US',137054); insert into channels_order values('direct sales','2009-09','GB',85223); insert into channels_order values('direct sales','2009-09','US',638201); insert into channels_order values('direct sales','2009-10','GB',91925); insert into channels_order values('direct sales','2009-10','US',682297); select channel_type,month,code,sum(sales) sums from channels_order ch group by channel_type,rollup(month,code);
upvoted 1 times
...
Lee_jong_suk
10 months, 3 weeks ago
D is correct, can't say about rollup
upvoted 1 times
...
yaya32
1 year ago
Selected Answer: A
A for me
upvoted 1 times
...
Mcromeo
1 year, 1 month ago
Selected Answer: D
D is the correct answer
upvoted 1 times
...
Roneros
1 year, 4 months ago
Selected Answer: 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?
upvoted 1 times
...
asdf123asdfr
1 year, 4 months ago
Selected Answer: 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.
upvoted 1 times
...
fgramos
1 year, 7 months ago
D is the correct answer
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago