vsql_statistics adds statistical aggregates that MySQL does not have: median
and quartiles, t-tests, z-tests, one-way ANOVA, chi-squared, covariance,
skewness, kurtosis, mode, and four kinds of mean. Each one returns a JSON
object as a string, so a single call gives you every figure the test produces.
Cast the result with CAST(... AS CHAR) and read the fields you want with
JSON_EXTRACT().
A third party writes and maintains this extension. VillageSQL does not build,
test, or ship it, and the description below follows the maintainer’s own
documentation. Read that documentation before you rely on it.
Install
Build it from the repository against SDK 0.0.4 or later (VillageSQL_BUILD_DIR names a VillageSQL build tree), copy the .veb file into the server’s veb_dir, then install it into
the server:
What it adds
Every one returns its figures as a JSON string, which
JSON_EXTRACT() reads directly on VillageSQL 0.0.7 and later; on earlier servers, apply CAST(... AS CHAR) first. STATS_IQR, for
instance, puts the fences beside the quartiles, so finding outliers is one
aggregate rather than three passes over the data.
See also
- Available extensions — the full catalog
- ronaldbradford/vsql-statistics — source, the full function reference, and the known limitations

