Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion docs/reference/sql/endpoints/jdbc.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ Query timeout (in seconds). That is the maximum amount of time waiting for a que

[float]
==== Mapping
`field.multi.value.leniency` (default `true`):: Whether to be lenient and return the first value for fields with multiple values (true) or throw an exception.
`field.multi.value.leniency` (default `true`):: Whether to be lenient and return the first value (without any guarantees of what that
will be - typically the first in natural ascending order) for fields with multiple values (true) or throw an exception.

[float]
==== Additional
Expand Down
42 changes: 23 additions & 19 deletions docs/reference/sql/functions/aggs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
Functions for computing a _single_ result from a set of input values.
{es-sql} supports aggregate functions only alongside <<sql-syntax-group-by,grouping>> (implicit or explicit).

==== General Purpose
[[sql-functions-aggs-general]]
[float]
=== General Purpose

[[sql-functions-aggs-avg]]
===== `AVG`
==== `AVG`

.Synopsis:
[source, sql]
Expand All @@ -33,7 +35,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[aggAvg]
--------------------------------------------------

[[sql-functions-aggs-count]]
===== `COUNT`
==== `COUNT`

.Synopsis:
[source, sql]
Expand Down Expand Up @@ -63,7 +65,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[aggCountStar]


[[sql-functions-aggs-count-all]]
===== `COUNT(ALL)`
==== `COUNT(ALL)`

.Synopsis:
[source, sql]
Expand All @@ -88,7 +90,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[aggCountAll]


[[sql-functions-aggs-count-distinct]]
===== `COUNT(DISTINCT)`
==== `COUNT(DISTINCT)`

.Synopsis:
[source, sql]
Expand All @@ -112,7 +114,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[aggCountDistinct]
--------------------------------------------------

[[sql-functions-aggs-first]]
===== `FIRST/FIRST_VALUE`
==== `FIRST/FIRST_VALUE`

.Synopsis:
[source, sql]
Expand Down Expand Up @@ -207,7 +209,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[firstValueWithTwoArgsAndGroupBy]
the field is also <<before-enabling-fielddata,saved as a keyword>>.

[[sql-functions-aggs-last]]
===== `LAST/LAST_VALUE`
==== `LAST/LAST_VALUE`

.Synopsis:
[source, sql]
Expand Down Expand Up @@ -302,7 +304,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[lastValueWithTwoArgsAndGroupBy]
the field is also <<before-enabling-fielddata,`saved as a keyword`>>.

[[sql-functions-aggs-max]]
===== `MAX`
==== `MAX`

.Synopsis:
[source, sql]
Expand Down Expand Up @@ -330,7 +332,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[aggMax]
<<sql-functions-aggs-last>> and therefore, it cannot be used in `HAVING` clause.

[[sql-functions-aggs-min]]
===== `MIN`
==== `MIN`

.Synopsis:
[source, sql]
Expand Down Expand Up @@ -358,7 +360,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[aggMin]
<<sql-functions-aggs-first>> and therefore, it cannot be used in `HAVING` clause.

[[sql-functions-aggs-sum]]
===== `SUM`
==== `SUM`

.Synopsis:
[source, sql]
Expand All @@ -381,10 +383,12 @@ Returns the sum of input values in the field `field_name`.
include-tagged::{sql-specs}/docs/docs.csv-spec[aggSum]
--------------------------------------------------

==== Statistics
[[sql-functions-aggs-statistics]]
[float]
=== Statistics

[[sql-functions-aggs-kurtosis]]
===== `KURTOSIS`
==== `KURTOSIS`

.Synopsis:
[source, sql]
Expand All @@ -408,7 +412,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[aggKurtosis]
--------------------------------------------------

[[sql-functions-aggs-mad]]
===== `MAD`
==== `MAD`

.Synopsis:
[source, sql]
Expand All @@ -432,7 +436,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[aggMad]
--------------------------------------------------

[[sql-functions-aggs-percentile]]
===== `PERCENTILE`
==== `PERCENTILE`

.Synopsis:
[source, sql]
Expand All @@ -458,7 +462,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[aggPercentile]
--------------------------------------------------

[[sql-functions-aggs-percentile-rank]]
===== `PERCENTILE_RANK`
==== `PERCENTILE_RANK`

.Synopsis:
[source, sql]
Expand All @@ -484,7 +488,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[aggPercentileRank]
--------------------------------------------------

[[sql-functions-aggs-skewness]]
===== `SKEWNESS`
==== `SKEWNESS`

.Synopsis:
[source, sql]
Expand All @@ -508,7 +512,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[aggSkewness]
--------------------------------------------------

[[sql-functions-aggs-stddev-pop]]
===== `STDDEV_POP`
==== `STDDEV_POP`

.Synopsis:
[source, sql]
Expand All @@ -532,7 +536,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[aggStddevPop]
--------------------------------------------------

[[sql-functions-aggs-sum-squares]]
===== `SUM_OF_SQUARES`
==== `SUM_OF_SQUARES`

.Synopsis:
[source, sql]
Expand All @@ -556,7 +560,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[aggSumOfSquares]
--------------------------------------------------

[[sql-functions-aggs-var-pop]]
===== `VAR_POP`
==== `VAR_POP`

.Synopsis:
[source, sql]
Expand Down
Loading