The PIVOT operator can be used to transform a set of rows into columns while the UNPIVOT operator complements the PIVOT operator by allowing you to turn columns into rows. The following sample will use AdventureWorks database.Sample CodeUSE AdventureWorks GOSELECT DaysToManufacture, sum(StandardCost...
[More]