[[esql-agg-functions]]
==== {esql} aggregate functions

++++
<titleabbrev>Aggregate functions</titleabbrev>
++++

The <<esql-stats-by>> command supports these aggregate functions:

// tag::agg_list[]
* <<esql-avg>>
* <<esql-count>>
* <<esql-count_distinct>>
* <<esql-max>>
* <<esql-median>>
* <<esql-median_absolute_deviation>>
* <<esql-min>>
* <<esql-percentile>>
* experimental:[] <<esql-st_centroid_agg>>
* <<esql-std_dev>>
* <<esql-sum>>
* <<esql-top>>
* <<esql-values>>
* <<esql-weighted_avg>>
// end::agg_list[]

include::layout/avg.asciidoc[]
include::layout/count.asciidoc[]
include::layout/count_distinct.asciidoc[]
include::layout/max.asciidoc[]
include::layout/median.asciidoc[]
include::layout/median_absolute_deviation.asciidoc[]
include::layout/min.asciidoc[]
include::layout/percentile.asciidoc[]
include::layout/st_centroid_agg.asciidoc[]
include::layout/std_dev.asciidoc[]
include::layout/sum.asciidoc[]
include::layout/top.asciidoc[]
include::layout/values.asciidoc[]
include::layout/weighted_avg.asciidoc[]
