Aggregates
Aggregate
median()
Returns the middle value of the set. NULL values are ignored. For even value counts, interpolate-able types (numeric, date/time) return the average of the two middle values. Non-interpolate-able types (everything else) return the lower of the two middle values.
Arguments & returns
median(x)
Aggregate
| Overload link | x |
Returns |
|---|---|---|
| #01 | ANY |
ANY |
Example
Haybarn WASM 1.5.5-rc3 · In your browser
Engine example with sample data · Run to view results.
In a query
Find the middle of the story.
Compare the average with the median to see how an unusually large value changes your summary.
Haybarn WASM 1.5.5-rc3 · In your browser
Guide recipe · Run to view results.