Generating Database Server-Side Cross Tabulations

December 4, 2003

[From O'Reilly ONLamp.com]

If you are a DBA or a database programmer, your manager may have asked you to prepare a breakdown of employees by location and department, or a breakdown of products by category and provider. If your boss is a techie, instead of a breakdown she might have mentioned a pivot table, or, if she likes to use "the right words," a cross-tabulation.

Cross-tabulations, also known as "pivot tables" or crosstabs, are statistical reports that group data by one field, creating one column for each distinct value of another field. In colloquial terms, this way of representing data is called "breaking down the data by X and Y," where X and Y are the names of two columns in the dataset.

The article continues at http://www.onlamp.com/pub/a/onlamp/2003/12/04/crosstabs.html