Question 800
A Log Analytics custom table `AppEvents_CL` records one row per request with datetime `TimeGenerated` and string `Result_s` equal to `Success` or `Failure`. A dashboard needs the count of failed requests in each 15-minute time bucket over the last six hours. Which complete KQL query returns that trend without counting successes?
Explanation
Correct Answer
The `where` clause restricts both the six-hour time window and the failure status. `summarize count() by bin(TimeGenerated, 15m)` then rounds each event timestamp into a 15-minute bucket and reports only failure counts per bucket, exactly matching the dashboard requirement.
Incorrect Answers
The predicates select recent failures, but grouping only by `Result_s` produces a single aggregate for the value Failure. It does not preserve the required series of 15-minute time bins.
This query creates 15-minute buckets but omits the six-hour filter and includes both successes and failures. A valid time-bucket shape without the correct row predicates does not produce a failed-request trend.
Grouping by status and time bucket produces separate Success and Failure rows, since the query lacks the required `Result_s == "Failure"` filter. The resulting data includes successful-request counts and therefore does not satisfy the requested failure-only output.