DEV Community

andreasneuman
andreasneuman

Posted on

Creating Pivot Tables in PostgreSQL

Pivot Table provides an interactive view of your data going significantly beyond the native crosstab function in PostgreSQL. With very little effort (and minimum queries) you can look at the same data from many different perspectives. This functionality comes in dbForge Studio for PostgreSQL along with other useful database management features. Try the tool and enjoy PostgreSQL pivoting without crosstab.

  • Extract the significance from a large, detailed data set
  • Slice and dice your database without a hitch
  • Make your data more comprehensive
  • Simplify data representation
  • Get all the metrics you need

Creating a Pivot Table

To create a pivot table, execute a query to select data you want to analyze and navigate to the query output. Right-click the data grid and select the Pivot table option from the Send to sub-menu. To add fields to the pivot table, simply drag them from the Data Source view to the required pivot table area.

Note:
Not all the data source tables are good for converting into pivot tables. The data source should contain a column with duplicated values, that can be grouped, and a column with numeric data, that can be used to calculate grand totals and custom totals.

Top comments (0)