TOP_CONCAT

    Syntax

    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 grouped values of expression delimited by separator (if separator is not specified, a comma is used).

    Argument types:

    • expressionArray of fractional numbers | Array of integers | Array of strings | Boolean | Date | Datetime | Fractional number | Geopoint | Geopolygon | Integer | String | UUID
    • amountInteger
    • separatorString

    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 19.13.