Search Shortcut cmd + k | ctrl + k
pivot_table

Provides a spreadsheet-style pivot_table function

Maintainer(s): Alex-Monahan

Compatibility Matrix

This table covers all DuckDB releases that have not reached end-of-life, including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.

Platform 1.4.4 1.4.5 1.5.5 1.5.6 2.0.0
Linux AMD64
Linux ARM64
macOS AMD64
macOS ARM64
Windows AMD64
Windows ARM64
WebAssembly

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 examples
build_my_enum table_macro NULL NULL  
columns_values_axis_columns macro NULL NULL  
columns_values_axis_rows macro NULL NULL  
dq macro NULL NULL  
dq_concat macro NULL NULL  
dq_list macro NULL NULL  
no_columns macro NULL NULL  
nq macro NULL NULL  
nq_concat macro NULL NULL  
nq_list macro NULL NULL  
pivot_table scalar NULL NULL  
pivot_table table_macro NULL NULL  
pivot_table_show_sql table_macro NULL NULL  
replace_zzz macro NULL NULL  
sq macro NULL NULL  
sq_concat macro NULL NULL  
sq_list macro NULL NULL  
totals_list macro NULL NULL  

Overloaded Functions

This extension does not add any function overloads.

Added Types

This extension does not add any types.

Added Settings

This extension does not add any settings.