For numeric values, returns the middle value or an interpolated value that would be the middle value after the values are sorted. Nulls are ignored in the calculation.
The function returns the same data type as the data type of the argument.
Type
MEDIAN is an aggregate function.