--Run in SSMS against AdventureWorks sample database SELECT TerritoryId, [2003-01],[2003-02],[2003-03],[2003-04],[2003-05],[2003-06], [2003-07],[2003-08],[2003-09],[2003-10],[2003-11],[2003-12], [2004-01],[2004-02],[2004-03],[2004-04],[2004-05],[2004-06], [2004-07] from ( select TerritoryId, CONVERT(CHAR(7), h.OrderDate, 120) AS theDate, d.LineTotal FROM Sales.SalesOrderHeader h JOIN Sales.SalesOrderDetail d ON h.SalesOrderID = d.SalesOrderID ) p pivot ( sum(LineTotal) for theDate in ([2003-01],[2003-02],[2003-03],[2003-04],[2003-05],[2003-06], [2003-07],[2003-08],[2003-09],[2003-10],[2003-11],[2003-12], [2004-01],[2004-02],[2004-03],[2004-04],[2004-05],[2004-06],[2004-07]) ) pvt order by TerritoryIdInner select runs in 390 milliseconds. However full SQL with pivot takes 5187 milliseconds. Repeated runs might change it a few milliseconds but the general timing stands.