Search Shortcut cmd + k | ctrl + k

- Overview
- Documentation
- Development
- Download Metrics
- FAQ
- Core Extensions
- List of Community Extensions

- duckpgq
- crypto
- open_prompt
- pivot_table
- bigquery

pivot_table
Downloads 647this week

Provides a spreadsheet-style pivot_table function

Extension repository on GitHub
Extension descriptor (YAML)

### Installing and Loading

    INSTALL pivot_table FROM community;
    LOAD pivot_table;

### Example

    FROM pivot_table(['duckdb_databases'], [], ['database_name'], [], []);

### About pivot_table

This extension, pivot_table, allow you to pivot your data using a spreadsheet-like pivot API. It is also similar to the Pandas pivot_table function. It does this solely through SQL macros - there are no C++ functions as a part of this extension.

### Added Functions

function_name | function_type | description | comment | example
--- | --- | --- | --- | ---
build_my_enum | table_macro |  |  |
columns_values_axis_columns | macro |  |  |
columns_values_axis_rows | macro |  |  |
dq | macro |  |  |
dq_concat | macro |  |  |
dq_list | macro |  |  |
no_columns | macro |  |  |
nq | macro |  |  |
nq_concat | macro |  |  |
nq_list | macro |  |  |
pivot_table | scalar |  |  |
pivot_table | table_macro |  |  |
pivot_table_openssl_version | scalar |  |  |
pivot_table_show_sql | table_macro |  |  |
replace_zzz | macro |  |  |
sq | macro |  |  |
sq_concat | macro |  |  |
sq_list | macro |  |  |
totals_list | macro |  |  |