# string_agg_distinct¶

## Description¶

Returns concatenated input values, separated by the delimiter. The expression must be a string column. The delimiter must be a string constant (it may be an empty string). Different from string_agg, string_agg_distinct does not accept an order_by argument, and the order of values in the concatenated string is non-deterministic.

string

## Domain¶

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

## Usage¶

string_agg_distinct( expr, delimiter )


Argument

Type

Required

Multiple

expr

string

Required

Only one

delimiter

string

Required

Only one

## Examples¶

statsby server_type:string_agg_distinct(server_type, ", "), group_by(region)


Set server_type to a string list of all distinct server types for each region. The order of the server types in each region is non-deterministic.