2 ms·
This what Kusto Query Language looks like: StormEvents | summarize TotalStormsInState = count(), StormsWithCropDamage = countif(DamageCrops >
by brikym 2y ago
This what Kusto Query Language looks like:
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.
- __thecoldwine__ 2y agoKusto is fine, but joins are quite horrendous there. To be frank, I don't really get complains about "SQL is not readable". Most of the time SQL is the most compact, clear and to the purpose way to fetch the data (given the data had been modeled in a manner suitable for queriying). Luckily, most of the tables for KQL in Azure are flat and not complex and that is partially what makes kusto so compelling.