@@ -104,19 +104,19 @@ optional as well:
104104:::{include} ../examples/stats.csv-spec/aggFilteringNoGroup.md
105105:: :
106106
107+ It’s also possible to group by multiple values :
108+
109+ :::{include} ../examples/stats.csv-spec/statsGroupByMultipleValues.md
110+ :: :
111+
107112$$$esql-stats-mv-group$$$
108- # ### Multivalued
113+ # ### Multivalued inputs
109114
110115If the grouping key is multivalued then the input row is in all groups :
111116
112117:::{include} ../examples/stats.csv-spec/mv-group.md
113118:: :
114119
115- It’s also possible to group by multiple values :
116-
117- :::{include} ../examples/stats.csv-spec/statsGroupByMultipleValues.md
118- :: :
119-
120120If all the grouping keys are multivalued then the input row is in all groups :
121121
122122:::{include} ../examples/stats.csv-spec/multi-mv-group.md
@@ -134,6 +134,11 @@ key. If you want to send the group key to the function then `MV_EXPAND` first:
134134:::{include} ../examples/stats.csv-spec/mv-group-values-expand.md
135135:: :
136136
137+ Refer to [elasticsearch/issues/134792](https://github.com/elastic/elasticsearch/issues/134792#issuecomment-3361168090)
138+ for an even more in depth explanation.
139+
140+ # ### Multivalue functions
141+
137142Both the aggregating functions and the grouping expressions accept other
138143functions. This is useful for using `STATS` on multivalue columns.
139144For example, to calculate the average salary change, you can use `MV_AVG` to
@@ -149,10 +154,6 @@ letter of their last name:
149154:::{include} ../examples/stats.csv-spec/docsStatsByExpression.md
150155:: :
151156
152- Note : This can get confusing if you do something like `| STATS a + SUM(a) BY a`
153- if `a` is multivalued. If you do that and are having trouble see
154- [github](https://github.com/elastic/elasticsearch/issues/134792#issuecomment-3361168090).
155-
156157# ### Naming
157158
158159Specifying the output column name is optional. If not specified, the new column
0 commit comments