Time series forecasting and statistics for DuckDB
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 quackstats FROM community;
LOAD quackstats;
Example
SELECT * FROM forecast('sales', timestamp := 'date', value := 'revenue', horizon := 7);
About quackstats
QuackStats brings time series forecasting and statistics directly into DuckDB as SQL table functions.
Forecasting with multiple models (ETS, linear, exponential, logistic, and automatic cross-validation model selection):
SELECT * FROM forecast('sales', timestamp := 'date', value := 'revenue', horizon := 30, model := 'auto');
Grouped forecasting across multiple series in a single query:
SELECT * FROM forecast('sales', timestamp := 'date', value := 'revenue', horizon := 30, group_by := ['region', 'product']);
Seasonality detection to identify periodic patterns:
SELECT * FROM detect_seasonality('sales', timestamp := 'date', value := 'revenue');
All forecasts include configurable prediction intervals (default 95%).
Maintained by the team at Kyomi.
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| detect_seasonality | table | NULL | NULL | |
| forecast | table | 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.