ARRAY_TO_STRING
Concatenates the string elements of an array into a single string, separated by a delimiter. NULL elements are skipped.
Syntax
ARRAY_TO_STRING(<array_of_strings>, <delimiter>)
Return Type
STRING
Examples
SELECT ARRAY_TO_STRING(['a', 'b', 'c'], ',') AS joined;
┌────────┐
│ joined │
├────────┤
│ a,b,c │
└────────┘
SELECT ARRAY_TO_STRING([NULL, 'x', 'y'], '-') AS joined_no_nulls;
┌──────────────────┐
│ joined_no_nulls │
├──────────────────┤
│ x-y │
└──────────────────┘