• Why don't you try to get the solution?

    I can't give a great advice on the reporting tool, but you should look for grouping options and totals (group footers), for T-SQL you can find a reference in here: http://technet.microsoft.com/en-us/library/bb522495(v=sql.105).aspx

    Give it a try and post any specific questions you have.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2