DZone

Raw data from database rows and tables does not provide much insight to human readers. Instead, humans are much more likely to see data patterns if we perform some kind of aggregation on the data before it is presented to us. A pivot table is a specific form of aggregation where we can apply operations like sorting, averaging, or summing, and also often a grouping of column values.

In this article, I will show how you can compute pivot tables of data from a database in pure Java without writing a single line of SQL. You can easily reuse and modify the examples in this article to fit your own specific needs.

Source: DZone