1

Given a table like below, is it possible in Kusto get the row with the greatest count for each food?

Person Food NumEaten

a   cake    28
b   cake    6
c   cake    3
d   cake    2
e   cake    2
f   pie     117
g   pie     79
h   pie     41
i   pie     35

Result to achieve:

Person  Food    NumEaten

a   cake    28
f   pie     117
Crayn
  • 35
  • 4

1 Answers1

1

You can use the arg_max() aggregation function or the partition operator. See similar post here: Get top 1 row of each group using Kusto

Yoni L.
  • 16,377
  • 1
  • 16
  • 34
  • Partition is exactly what I was looking for! I was scouring around trying to find a way to "loop" through values. – Crayn Apr 01 '22 at 12:53