[Solved] extend current query, calculated columns
Since you have two columns that you now want to PIVOT, you’ll first have to unpivot those columns and then convert those values into the new columns. Starting in SQL Server 2005, you could use CROSS APPLY to unpivot the columns. The basic syntax will be similar to: select name, new_col, total from ( select … Read more