by brikym · 1y ago · 0 comments
StormEvents
| summarize
TotalStormsInState = count(),
StormsWithCropDamage = countif(DamageCrops > 0)
by State
| extend PercentWithCropDamage =
round((todouble(StormsWithCropDamage) /
TotalStormsInState \* 100), 2)
| sort by StormsWithCropDamage
I find it to be much more readable. With SQL CTEs is as close as you can get.Luckily, most of the tables for KQL in Azure are flat and not complex and that is partially what makes kusto so compelling.