Shan
Shan

Reputation: 61

How to nest kusto query based on grouped value

I have a table that contains items and their changing prices depending on the dates.

gold 12-jan $400
gold 15-jan $440
silv 13-jan $100
silv 10-jan $090

I need a kusto query that can fetch me the item and its latest price. so output be:

gold 15-jan $440
silv 13-jan $100

Upvotes: 0

Views: 193

Answers (1)

Avnera
Avnera

Reputation: 7608

Use arg_max

For example:

T | summarize arg_max(timestamp, *) by item

Upvotes: 2

Related Questions