Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/reference/esql/processing-commands/stats.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
[[esql-stats-by]]
=== `STATS ... BY`

The `STATS ... BY` processing command groups rows according to a common value
and calculates one or more aggregated values over the grouped rows.

**Syntax**

[source,esql]
Expand Down Expand Up @@ -38,6 +41,10 @@ The following <<esql-agg-functions,aggregation functions>> are supported:

include::../functions/aggregation-functions.asciidoc[tag=agg_list]

The following <<esql-group-functions,grouping functions>> are supported:

include::../functions/grouping-functions.asciidoc[tag=group_list]

NOTE: `STATS` without any groups is much much faster than adding a group.

NOTE: Grouping on a single expression is currently much more optimized than grouping
Expand Down
Loading