TOP_CONCAT
Written by
Updated at June 27, 2023
Syntax
Standard
Extended
TOP_CONCAT( expression, amount [ , separator ] )
TOP_CONCAT( expression, amount [ , separator ]
[ FIXED ... | INCLUDE ... | EXCLUDE ... ]
[ BEFORE FILTER BY ... ]
)
More info:
Description
Returns a string that contains top amount
unique values of expression
delimited by separator
(if separator
is not specified, a comma is used).
Argument types:
expression
—Array of fractional numbers | Array of integers | Array of strings | Boolean | Date | Datetime | Fractional number | Geopoint | Geopolygon | Integer | String | UUID
amount
—Integer
separator
—String
Return type: String
Note
Only constant values are accepted for the arguments (amount
, separator
).
Examples
TOP_CONCAT([Profit], 3)
TOP_CONCAT([Profit], 3, '; ')
Data source support
ClickHouse 21.8
, YDB
.