MEDIAN

functionsupportedCore SQL functions

docs.snowflake.com ↗

Data metric functionsAggregate functionsWindow functions

Determines the median of a set of values.

Syntax

supportedpartialnot supportednot scored

Aggregate function

MEDIAN( <expr> )

Window function

MEDIAN( <expr> ) OVER ( [ PARTITION BY <expr2> ] )

Returns

Returns a FLOAT or DECIMAL (fixed-point) number, depending upon the input.

Usage notes

Argument

expr: The expression must evaluate to a numeric data type (INTEGER, FLOAT, DECIMAL, or equivalent).