ARG_MIN

    Syntax

    ARG_MIN( value, comp )
    
    ARG_MIN( value, comp
             [ FIXED ... | INCLUDE ... | EXCLUDE ... ]
             [ BEFORE FILTER BY ... ]
           )
    

    More info:

    Description

    Returns value for the minimum value of comp in the group. If multiple values of value match the minimum value of comp, then the first one encountered is returned. This makes the function non-deterministic.

    Argument types:

    • valueAny
    • compAny

    Return type: Same type as (value)

    Example

    ARG_MIN([Sales], [Profit])
    

    Data source support

    ClickHouse 19.13.