max() (aggregation function)

Finds the maximum value across the group.

Note

This function is used in conjunction with the summarize operator.

Syntax

max (Expr)

Arguments

Name Type Required Description
Expr string Expression used for aggregation calculation.

Returns

Returns the maximum value of Expr across the group.

Tip

This gives you the max on its own. But if you want other columns in the rowuse arg_max.

Example

This example returns the last record in a table.

[Click to run query]

StormEvents
| summarize LatestEvent=max(StartTime)

Results

LatestEvent
2007-12-31T23:53:00Z