Aggregate FunctionsStatistical
stdev
Calculates the sample standard deviation of values in the group.
Syntax
stdev(val)Parameters
Prop
Type
Returns: real
Syntax
stdev(val)Parameters
Prop
Type
Returns: real
Examples
Example 1 — Sample standard deviation of crossing times
datatable(ship:string, crossing_hours:real)[
"Naglfar", 48.0,
"Wave Rider", 72.0,
"Storm Bear", 36.5,
"Sea Serpent", 55.0,
"Ravens Wing", 60.0
]
| summarize stdev(crossing_hours)| stdev_crossing_hours (real) |
|---|
| 13.255187663703596 |
Example 2 — Standard deviation of voyages per clan
datatable(clan:string, warrior:string, voyages:long)[
"Lothbrok", "Ragnar", 42,
"Lothbrok", "Bjorn", 31,
"Lothbrok", "Ivar", 18,
"Fairhair", "Harald", 25,
"Fairhair", "Halfdan", 12
]
| summarize stdev(voyages) by clan| clan (string) | stdev_voyages (real) |
|---|---|
| Fairhair | 9.192388155425117 |
| Lothbrok | 12.013880860626733 |