As a beginner I'm looking for sample queries to understand how to create my own queries in Log Analytics. I came across the sample below and it seems to do what I need. However the query fails when run with error:
"No query statement found"
Any thoughts on why this unmodified sample doesn't work (anymore)?
let ComputersMissingUpdates3DaysAgo = Update
| where TimeGenerated between (ago(3d)..ago(2d)) | where Classification == "Critical Updates" and UpdateState != "Not needed" and UpdateState != "NotNeeded" | summarize makeset(Computer);
Update | where TimeGenerated > ago(1d) | where Classification == "Critical Updates" and UpdateState != "Not needed" and UpdateState != "NotNeeded" | where Computer in (ComputersMissingUpdates3DaysAgo) | summarize UniqueUpdatesCount = dcount(Product) by Computer, OSType
That error means the query was not "found" when you clicked the "Run" button, and that's usually because the cursor was on an empty line. Try placing the query editor's cursor anywhere on the query text itself, and then click "Run".
On another note, we have many examples you can use: