median

The median* functions are the aliases for the corresponding quantile* functions. They calculate median of a numeric data sample.

Functions:

Example

Input table:

  1. ┌─val─┐
  2. 1
  3. 1
  4. 2
  5. 3
  6. └─────┘

Query:

  1. SELECT medianDeterministic(val, 1) FROM t

Result:

  1. ┌─medianDeterministic(val, 1)─┐
  2. 1.5
  3. └─────────────────────────────┘