Table Pivot
QStudio provides an extremely powerful pivot concept that allows users to zoom out and drill down into data easily. QStudio has implemented the pivot logic itself to ensure it works on all databases but where possible it uses the databases builtin pivot ability for optimal speed.
To start Pivot Mode, click the pivot icon on the results panel.
Pivot Controls
- Send your query.
- Configure which columns you want to group by (Ctrl+Click to select multiple).
- Select which aggregation function you want to perform on which target column.
- Optionally choose a pivot.
- Finally press "Copy Query" to copy the SQL query that performs that pivot to your Clipboard.
How it works
- The first query sent to the database is used to detect which columns a user should be able to choose from for grouping.
- If GroupBy column(s) are specified, it wraps your query with a "select .... from (originalQuery) GROUP BY ..." to perform the aggregation on the database foroptimal speed.
- If PivotOn column(s) are specified, Pulse pivots rows to become columns for most databases. For special databases that support it, we use their pivot implementation.