Product
Open source

the-stats-duck

A DuckDB extension that adds statistical functions to the SQL surface. The shared analytics layer that quietly powers both KoliLang and Bedevere.

What it does

DuckDB ships with a strong but deliberately compact statistics surface. the-stats-duck extends it with the additional functions and distributions that clinical and tabular analytics actually need — quantile families, distribution CDFs and inverses, hypothesis-test machinery, the supporting numerics — without forcing analysts to leave SQL for a host language.

Charts from SQL

Statistics are only half the story. the-stats-duck also adds a VISUALIZE directive to DuckDB’s SQL surface, so a query can describe a chart and hand back a plot — the same SQL-native approach as the stats, and the charting primitive Bedevere builds on. The grammar (ggsql) now aims to follow that of DuckDB’s ggplot extension.

Why it exists

Both KoliLang and Bedevere lean on DuckDB for the heavy lifting. When KoliLang needs a quantile or a distribution function for a SAS proc, or Bedevere needs the same primitive for an interactive query, the answer should come from the same place. That place is the-stats-duck.

Use it

The extension is open source. Build it from source, load it into any DuckDB session, and the new functions are available on the SQL surface alongside the built-ins. The repo is the source of truth for current function coverage and build instructions.

Repository: github.com/KoliStat/the-stats-duck

Need a function?

the-stats-duck grows by demand. If there’s a statistic, distribution, or test you need that isn’t there yet, get in touch — request it for the roadmap, or sponsor it to jump the queue. Commissioned functions ship in the open-source extension, so everyone gets them.