--- toc_priority: 106 --- # argMax {#agg-function-argmax} Syntax: `argMax(arg, val)` Calculates the `arg` value for a maximum `val` value. If there are several different values of `arg` for maximum values of `val`, the first of these values encountered is output.