0
votes

I'm trying write a simple Kusto query to find the max value of x for each y. To be more specific, I'm querying the Azure Data Explorer sample table "Covid", trying to get the max number of deaths by country. I tried using a few things like this

Covid19
| summarize MostDeaths = max(Deaths) by Country
| project Country, MostDeaths

But this is not working of course. I also haven't found anything like this (simple as it is) in the documentation with its examples.

Edit: Expected results: Expected results

Actual results: "A recognition error occurred. Token: | Line: 3, Position: 0"

1
it may help if you clarified what's not working - what does the query you included return, and how that differs from your expectationYoni L.
Question updated.SendETHToThisAddress

1 Answers

2
votes

Your query, as you've written it in your question - is valid (syntactically and semantically).

You can click this deep-link to run it and see for yourself: https://dataexplorer.azure.com/clusters/help/databases/Samples?query=H4sIAAAAAAAAA3POL8tMMbTkqlEoLs3NTSzKrEpV8M0vLnFJTSzJKFawVchNrNCAcDQVkioVnPNL80qKKoHqC4rys1KTS2AiOkjaACLGJoNVAAAA

Given the error message you're seeing, I can guess that you're actually running a different query.

(perhaps:

  • do you have a duplicate pipe (|) ?
  • or - are you missing a linebreak between multiple queries in the same query editor tab?

)