max() (aggregation function)
Learn how to use the max() function to find the maximum value of the expression in the table.
Finds the maximum value of the expression in the table.
Syntax
max(
expr)
Parameters
Name | Type | Required | Description |
---|---|---|---|
expr | string | ✔️ | The expression for which the maximum value is determined. |
Returns
Returns the value in the table that maximizes the specified expression.
Example
The following example returns the last record in a table by querying the maximum value for StartTime.
StormEvents
| summarize LatestEvent=max(StartTime)
Output
LatestEvent |
---|
2007-12-31T23:53:00Z |
Related content
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.