ClickHouse/docs/en/sql-reference/aggregate-functions/reference/groupuniqarray.md

14 lines
540 B
Markdown
Raw Normal View History

---
2022-08-28 14:53:34 +00:00
slug: /en/sql-reference/aggregate-functions/reference/groupuniqarray
2024-06-24 12:32:52 +00:00
sidebar_position: 154
---
2022-06-02 10:55:18 +00:00
# groupUniqArray
Syntax: `groupUniqArray(x)` or `groupUniqArray(max_size)(x)`
Creates an array from different argument values. Memory consumption is the same as for the [uniqExact](../../../sql-reference/aggregate-functions/reference/uniqexact.md) function.
The second version (with the `max_size` parameter) limits the size of the resulting array to `max_size` elements.
For example, `groupUniqArray(1)(x)` is equivalent to `[any(x)]`.