-
Data Analysis function can be either a group function or a window function.
-
T-SQL Supports 3 clauses that allow define multiple grouping sets.These operators can generate the same result set as when you use UNION ALL to combine single grouping queries.Here and here are the Details.
-
ROLLUP
-
CUBE
-
Grouping Sets
-
-
Rollup is used where hierarchy is formed in the input columns like for Country,Region,city.
-
Grouping
Grouping_ID
Excepts one input and returns 0 if element is in grouping set else 1
Excepts lists of columns as input and return a integer representing bitmap.
GROUPING is used to distinguish the null values that are returned by ROLLUP, CUBE or GROUPING SETS from standard null values.
https://msdn.microsoft.com/en-us/library/ms178544.aspx
https://msdn.microsoft.com/en-us/library/bb510624.aspx
Archive for the ‘Development’ Category
Exam 70-461 Notes – Grouping Sets
Posted by Pramod Singla on March 23, 2017
Posted in Certifications, Development, MCSA 70-461 | Tagged: exam 70-461, grouping | Leave a Comment »