2020-06-18 08:24:31 +00:00
---
2022-08-28 14:53:34 +00:00
slug: /en/sql-reference/aggregate-functions/reference/groupuniqarray
2022-04-09 13:29:05 +00:00
sidebar_position: 111
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)]` .