December 13, 2017 at 10:04 pm
Comments posted to this topic are about the item Cube v rollup
December 13, 2017 at 10:06 pm
Interesting question, thanks Steve
Haven't used CUBE/ROLLUP in a long time - much prefer GROUPING SETS
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
βlibera tute vulgaris exβ
December 14, 2017 at 1:17 am
Not sure I follow the reasoning behind the correct answers. WITH CUBE returns more rows, but not WITH ROLLUP. And yet they return the same number of rows? How is this reasonable?
As I see it, this should not have been a multiple choice question, but rather a single choice with "They return the same number of rows" as the correct answer.
December 14, 2017 at 1:42 am
Steve Jones - SSC Editor - Wednesday, December 13, 2017 10:04 PMComments posted to this topic are about the item Cube v rollup
I got it right but I really wanted the answer to be Cube, Rollup and same number of rows, because "in this case" as the answer states cube and rollup return the same number.
December 14, 2017 at 2:08 am
Presumably there's a mistake in the question requiring 2 answers and it is meant to be a single-answer question? The only possible answer if 2 are correct would be that Rollup returns more and With Cube syntax is wrong, yet neither of those is true!
December 14, 2017 at 2:44 am
Rune Bivrin - Thursday, December 14, 2017 1:17 AMNot sure I follow the reasoning behind the correct answers. WITH CUBE returns more rows, but not WITH ROLLUP. And yet they return the same number of rows? How is this reasonable?As I see it, this should not have been a multiple choice question, but rather a single choice with "They return the same number of rows" as the correct answer.
I don't follow it either. Please enlighten us.
December 14, 2017 at 2:50 am
Apologies. Accidentally checked two boxes. This has been fixed and the points awarded back.
In this case, with one group by column, both operators return the same number of rows.
December 14, 2017 at 10:08 am
Steve Jones - SSC Editor - Thursday, December 14, 2017 2:50 AMApologies. Accidentally checked two boxes. This has been fixed and the points awarded back.In this case, with one group by column, both operators return the same number of rows.
Hello π
I had this problem today morning when I tried to answer it I chose that the right option was the one that says that both were correct since I know that cube and rollup have the same behavior when there is only one dimension being used, but I got a message saying that I had to choose two options.. well I did not give up on me and I picked cube and rollup option, but then told me that the right question was the first one I picked π .. I'm still seeing that my answer is wrong I just want my point on this one π
A. Mauricio Repetto
ML Engineer
December 14, 2017 at 10:48 am
I definitely misinterpreted the question - I read it as "Which operator in the WITH clause results in more rows in the results than would be in in the set in the absence of the WITH clause? " Obviously adding that extra verbiage was incorrect, but it caused me to misinterpret the answers, so as soon as I found one answer that worked I assumed I had the answer. It also caused me to read "They return the same number of rows" as "they don't add rows to the result set returned in the absence of the WITH clause". Doh!
December 15, 2017 at 12:44 am
amd.repetto - Thursday, December 14, 2017 10:08 AMSteve Jones - SSC Editor - Thursday, December 14, 2017 2:50 AMApologies. Accidentally checked two boxes. This has been fixed and the points awarded back.In this case, with one group by column, both operators return the same number of rows.
Hello π
I had this problem today morning when I tried to answer it I chose that the right option was the one that says that both were correct since I know that cube and rollup have the same behavior when there is only one dimension being used, but I got a message saying that I had to choose two options.. well I did not give up on me and I picked cube and rollup option, but then told me that the right question was the first one I picked π .. I'm still seeing that my answer is wrong I just want my point on this one π
Yup. I'm in the same boat. But I've come to more or less expect a couple of back and fro's with Steve's QotD's. He seems to be using something I regularly advocate: CDT - Complaint Driven Development.
Side note: This is actually a quite useful technique when dealing with users. They often don't know what they want (or at least are unable to articulate it), but are quite capable of identifying things that don't work.
December 15, 2017 at 7:15 pm
Hmm... a trick question, I think.
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply