Microsoft Azure Developer Associate AZ-204 Practice Question
When examining Application Insights data for an ASP.NET Core API you want to pinpoint operations that generated server errors in the last hour. Specifically, list each operation whose requests returned an HTTP 5xx code more than 50 times and show those operations ordered from slowest to fastest by their average request duration. Which Kusto Query Language (KQL) query meets the requirements?
requests | where timestamp >= ago(1h) | where toint(resultCode) between (500 .. 599) | summarize count() > 50, avg(duration) by operation_Name // invalid summarize syntax | order by avgDuration ascrequests | where timestamp >= ago(1h) | where toint(resultCode) between (500 .. 599) | summarize count_=count(), avgDuration=avg(duration) by operation_Name | where count_ > 50 | order by avgDuration descrequests | where timestamp >= ago(1h) | where resultCode startswith "5" | summarize avgDuration = avg(duration) by operation_Name | where count_ > 50 // count_ is not defined here | order by avgDuration desctraces | where timestamp >= ago(1h) | where severityLevel >= 3 | summarize count_=count(), avgDuration=avg(duration) by operation_Name | where count_ > 50 | order by avgDuration desc