SQL Server using PIVOT example

SQL Server using a simple PIVOT function in a real world type scenario, where the number of columns is always known.

In the last I article, I wrote about using UNPIVOT, this is the opposite function PIVOT, where it will turn rows into columns, I have used some data that may not necessarily be a real world example, but will give us enough options to play with.

Author

I formed Claytabase in 2010 as a way of carrying on my work with SQL Server and ASP.NET. This has culminated in the Ousia Content Management System being taken from concept to one of the quickest CMS's on the market.