mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 21:24:28 +00:00
7170f3c534
* prefer relative links from root * wip * split aggregate function reference * split system tables
15 lines
541 B
Markdown
15 lines
541 B
Markdown
---
|
|
toc_priority: 110
|
|
---
|
|
|
|
# groupArray {#agg_function-grouparray}
|
|
|
|
Syntax: `groupArray(x)` or `groupArray(max_size)(x)`
|
|
|
|
Creates an array of argument values.
|
|
Values can be added to the array in any (indeterminate) order.
|
|
|
|
The second version (with the `max_size` parameter) limits the size of the resulting array to `max_size` elements. For example, `groupArray(1)(x)` is equivalent to `[any (x)]`.
|
|
|
|
In some cases, you can still rely on the order of execution. This applies to cases when `SELECT` comes from a subquery that uses `ORDER BY`.
|