Hi, this "grouping sets" available in sql server 2005 i tried it shows error...is it in advanced version.
That is correct. I began the question with
SQL Server 2008 introduces GROUPING SETS
so that thier would not be any confusion about the server version that supports it.