KQL query to filter unique ID with highest value

Viewed 162

If my KQL query is returning this

ID Value
123 1000
123 50
456 100
456 1400

How can I get it to return only one result per ID, of which has the highest value, e.g.

ID Value
123 1000
456 1400
1 Answers

summarize

datatable (ID:int, Value:int)
[
     123    ,1000
    ,123    ,50
    ,456    ,100
    ,456    ,1400
]    
| summarize max(Value) by ID
ID max_Value
123 1000
456 1400

Fiddle

Related