MEDIAN [Analytic]
For each row, returns the median value of a value set within each partition. MEDIAN determines the argument with the highest numeric precedence, implicitly converts the remaining arguments to that data type, and returns that data type.
MEDIAN is an alias of PERCENTILE_CONT [Analytic] with an argument of 0.5 (50%).
Behavior Type
Syntax
MEDIAN ( expression ) OVER ( [ window‑partition‑clause ] )
Parameters
| expression |
Any |
OVER()
|
If the |
Examples
See Calculating a Median Value