It's a nice question.
Hugo raises an interesting point:
Hugo Kornelis (12/6/2012)
I picked the right answer, but only after thinking about it for a long time - go with Books Online, or go with common sense. So I am surprised that so many people here consider this to be a simple question. However, the good news is that those people will probably be able to explain me something.
According to the Merriam-Webster English dictionary, the verb "to aggregate" is defiend as "to collect or gather into a mass or whole" (http://www.merriam-webster.com/dictionary/aggregate?show=0&t=1354796918). I checked it, just to make sure, but I am glad that the dictionary definition matches what I consider aggregation to be.
Now I have no problem with CHECKSUM_AGG and STDEVP. Both collect data from multiple rows, and generate a single value from that, be it a checksum value, or the standard deviation of the data collected. No problem. But, and here is the question I hope someone will answer me:
Exactly WHAT is aggregated by the GROUPING_ID function??
Well, of course, nothing is aggregated by it. I want to agree that this is not a sensible use of the phrase "aggregate function", but when I look hard at the words I see that MS has got it right. The problem is that concentrating on the verb instead of on the adjective(in "aggregate function", "aggregate" is clearly an adjective, not a verb) or on the noun phrase ("aggregate function") leads us astray. I think that GROUPING_ID" just about scrapes in under the bar as a function which is related to a collection of several units, and to the structure of that collection. I don't like it, but the pedant in me tells me I ought to.
Microsoft commit a far worse terminological offense when they call their aggregate XOR function "CHECKSUM_AGG" instead of "XOR_AGG". This aggregate function has nothing to do with CHECKSUM, and including a refernece to the CHECKSUM page in the reference section of the CHECKSUN_AGG page just compounds the lunacy - CHECKSUM, unlike CHECKSUM_AGG, computes a genuine checksum, not a trivial vertical parity. Anyone who has worked on genuine error detection, containment, and recovery will be thoroughly displeased by this misleading terminology. People who use genuine checksums for hashing won't be too happy with it either.