Skip to main content
Version: current [25.x]

Categories: Aggregate, Percentile

MEDIAN

Computes the median of the specified column's values based on a continuous distribution.

Syntax

MEDIAN(num_col numeric) → double precision

  • num_col: A numeric column whose median value you want to compute.

Examples

MEDIAN example
SELECT MEDIAN(pop) FROM Samples."samples.dremio.com"."zips.json"
-- 2783.0

Usage Notes

Use only with numeric data types. Dremio ignores NULL values in the specified column.