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.
Because you can pivot the data by looking at different cuts of the same metric (sales by city, by product, by salesperson, etc), making pivot tables is a good way to look for relationships and perform basic exploratory analysis. But, as powerful as pivot tables are, they remain hard to learn for many people.