With its new release, Microsoft SQL Server 2008 included
some new features that some of us (as developers) will find interesting and
useful. In this article about the new features of SQL Server 2008, I will try
to shed some light on the grouping Sets feature (a nifty addition) as
attributed to the family of T-SQL.
About The Feature
The grouping sets intended to provide a powerful grouping
tool in a single SQL Statement by different fields having the same selection
number of fields. This feature is especially useful in the case of collecting
summary data using different criteria.
In order to apply the article procedures, you should have
installed any version of Microsoft SQL Server 2008 (Express, Standard,
Developer, or Enterprise) and applied the first article of this series - SQL Server 2008 New Features - Row Constructors.