max([value: storable]+) -> value

Returns the maximum of comparable storable values. With one argument in aggregate or window() context, max reduces each group while skipping null inputs. With multiple arguments, it is a scalar greatest-style expression over those values with per-argument null propagation: any null argument makes the result null. Supported types mirror min (numeric, bool, string, duration, timestamp).

Domain

This is an aggregate function (aggregates rows over a group in aggregate verbs).

This is a window function (calculates over a group of multiple input rows using windowing).

Categories

Examples

statsby peak_rss:max(rss_bytes), group_by(pod)

Reports the largest rss_bytes sample observed per pod using max in aggregate form over non-null readings.

make_col ceiling:max(price_a, price_b, price_c)

Uses scalar max to choose the highest of three competing price fields per row with standard null propagation.