2020-06-18 08:24:31 +00:00
---
2022-08-28 14:53:34 +00:00
slug: /en/sql-reference/aggregate-functions/reference/groupuniqarray
2024-06-24 11:52:30 +00:00
sidebar_position: 153
2020-06-18 08:24:31 +00:00
---
2022-06-02 10:55:18 +00:00
# groupUniqArray
2020-06-18 08:24:31 +00:00
Syntax: `groupUniqArray(x)` or `groupUniqArray(max_size)(x)`
2020-07-09 15:10:35 +00:00
Creates an array from different argument values. Memory consumption is the same as for the [uniqExact ](../../../sql-reference/aggregate-functions/reference/uniqexact.md ) function.
2020-06-18 08:24:31 +00:00
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)]` .