The data below are a subset of the Resale dataset provided with the software. This (computer simulated) data. gives the selling price, the number of bedrooms, the total square footage (finished and unfinished), and the size of. the lots for 150 residential properties sold during the last four months in two states.
A common scenario where PIVOT can be useful is when you want to generate cross-tabulation reports to summarize data. For example, suppose you want to query the PurchaseOrderHeader table in the AdventureWorks2008R2 sample database to determine the number of purchase orders placed by certain employees.
For example, in Microsoft Excel one must first select the entire data in the original table and then go to the Insert tab and select Pivot Table (or Pivot Chart). The user then has the option of either inserting the pivot table into an existing sheet or creating a new sheet to house the pivot table.