-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
28 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
StormEvents | ||
| project State, EventType, DamageProperty | ||
| extend foo=1 | ||
| summarize TotalDamage=sum(DamageProperty) by State | ||
| sort by TotalDamage desc | ||
| limit 10 | ||
| render barchart with ( | ||
title="Property Damage by State", | ||
xtitle="State", | ||
ytitle="Total Damage ($)" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
State,TotalDamage,render_type,render_prop_title,render_prop_xtitle,render_prop_ytitle | ||
FLORIDA,6200000,barchart,Property Damage by State,State,Total Damage ($) | ||
MISSISSIPPI,20000,barchart,Property Damage by State,State,Total Damage ($) | ||
GEORGIA,2000,barchart,Property Damage by State,State,Total Damage ($) | ||
ATLANTIC SOUTH,0,barchart,Property Damage by State,State,Total Damage ($) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
WITH "__subquery0" AS (SELECT "State" AS "State", "EventType" AS "EventType", "DamageProperty" AS "DamageProperty" FROM "StormEvents"), | ||
"__subquery1" AS (SELECT *, 1 AS "foo" FROM "__subquery0"), | ||
"__subquery2" AS (SELECT "State" AS "State", sum("DamageProperty") AS "TotalDamage" FROM "__subquery1" GROUP BY "State"), | ||
"__subquery3" AS (SELECT * FROM "__subquery2" ORDER BY "TotalDamage" DESC NULLS LAST LIMIT 10) | ||
SELECT *, | ||
'barchart' as "render_type", | ||
'Property Damage by State' as "render_prop_title", | ||
'State' as "render_prop_xtitle", | ||
'Total Damage ($)' as "render_prop_ytitle" | ||
FROM "__subquery3"; |
Empty file.