Returns the median of all values in each group. MEDIAN returns the average of the two middle values if the value_expression contains an even number of values. It is a single-threaded function.
To invoke the time series version of this function, use the GROUP BY TIME clause. For more information, see GROUP BY TIME Clause.
This function returns the REAL data type.
Nulls are not included in the result computation.
- MEDIAN is valid only for numeric data.
DISTINCT is only valid with MEDIAN when using the time series version of MEDIAN. MEDIAN DISTINCT queries return an error if not associated with a GROUP BY TIME clause.