statistics that live in your SQL
last updated: Jun 24, 2026
https://kolistat.com/blog/the-stats-duck-v0-6-0/
Announcement of a really neat duckdb extension called the-stats-duck (KoliStat/the-stats-duck) which puts statistical functions inside duckDB.
It then goes on to add some visualization in duckdb sql, by serializing out to vega-lite format, á la ggsql (which the author calls out on news.yc as a direct inspiration)
My favorite bit is the function meta() as a table-valued function, allowing you to select from it:
SELECT
column_name, kind, n_missing , n_distinct, mean, median, stddev, top
FROM meta('penguins');
I don't use R, but I think that's basically the same as its summary() function.
It also builds in LOESS regression and embeds an R-like specification language for it:
SELECT *
FROM lm_summary(
'penguins'
, formula := 'body_mass_g ~ flipper_length_mm + bill_length_mm'
);
Also, neat job building the demo into WASM and serving it as part of the page, strong work.