OpenSearch/docs/reference/sql/functions
Marios Trivyzas 4710a7472f
SQL: Implement FIRST/LAST aggregate functions (#37936)
FIRST and LAST can be used with one argument and work similarly to MIN
and MAX but they are implemented using a Top Hits aggregation and
therefore can also operate on keyword fields. When a second argument is
provided then they return the first/last value of the first arg when its
values are ordered ascending/descending (respectively) by the values of
the second argument. Currently because of the usage of a Top Hits
aggregation FIRST and LAST cannot be used in the HAVING clause of a
GROUP BY query to filter on the results of the aggregation.

Closes: #35639
2019-01-31 16:33:05 +02:00
..
aggs.asciidoc SQL: Implement FIRST/LAST aggregate functions (#37936) 2019-01-31 16:33:05 +02:00
conditional.asciidoc SQL: documentation improvements and updates (#36918) 2018-12-21 23:25:54 +02:00
date-time.asciidoc SQL: Rename SQL type DATE to DATETIME (#37395) 2019-01-17 10:17:58 +02:00
grouping.asciidoc SQL: Introduce SQL DATE data type (#37693) 2019-01-24 13:41:58 +02:00
index.asciidoc SQL: Introduce HISTOGRAM grouping function (#36510) 2018-12-14 18:20:37 +02:00
math.asciidoc SQL: documentation improvements and updates (#36918) 2018-12-21 23:25:54 +02:00
operators.asciidoc SQL: documentation improvements and updates (#36918) 2018-12-21 23:25:54 +02:00
search.asciidoc SQL: documentation improvements and updates (#36918) 2018-12-21 23:25:54 +02:00
string.asciidoc SQL: [docs] Add `beta[]` markup to all SQL pages (#36471) 2018-12-11 13:25:29 +02:00
system.asciidoc SQL: documentation improvements and updates (#36918) 2018-12-21 23:25:54 +02:00
type-conversion.asciidoc SQL: Rename SQL type DATE to DATETIME (#37395) 2019-01-17 10:17:58 +02:00