array_agg_distinct

array_agg_distinct(expr: storable) -> generic array

Returns an array of distinct input values. The expression must be a valid expression (not a regex or other type). Different from array_agg, array_agg_distinct does not accept an order_by argument, and the order of values in the output array is non-deterministic.

Domain

This is an aggregate function (aggregates rows over a group in aggregate verbs).

Categories

Examples

statsby server_type:array_agg_distinct(server_type), group_by(region)

Sets server_type to an array containing all distinct server types for each region. The order of the server types in each region is non-deterministic.