• Yes.  Use GROUPING SETS.  If you want a more complete answer, post sample data and expected results as outlined in the first link in my signature.

    This would be much easier in a report tool such as SSRS.  Have you considered that?

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA