Home Forums SQL Server 2008 T-SQL (SS2K8) is it possible to union all two CTEs? RE: is it possible to union all two CTEs?
aaron.reese
SSChampion
Points: 13498
More actions
May 8, 2013 at 10:26 am
#1613440
My 2 Cents worth,
Seeing as Count(tickets) and Sum(duation) are both aggregates on the same dataset with the same grouping, why not do them in the one CTE and then UNPIVOT() the results