max
The max function returns the maximum of the values within a numeric column.
It is often used with match to get the maximum value within each group in
the data.
| Syntax | Param data types | Return type |
|---|---|---|
max(numericExpression) |
NUMBER |
NUMBER |
Code Sample
Find all the events where
target.ipis not empty. For all the events that match onprincipal.ip, store the maximum ofmetadata.event_timestamp.secondsin a variable calledmax_seconds.target.ip != "" match: principal.ip outcome: $max_seconds = max(metadata.event_timestamp.seconds)