MEDIAN

Syntax

MEDIAN( value )
MEDIAN( value        [ FIXED ... | INCLUDE ... | EXCLUDE ... ]        [ BEFORE FILTER BY ... ]      )

More info:

Description

Returns the median value. For an even number of items, it returns the greatest of the neighboring items in the central position.

Argument types:

  • valueDate | Datetime | Fractional number | Integer

Return type: Same type as (value)

Example

MEDIAN([Profit])

Data source support

ClickHouse 21.8, Oracle Database 12c (12.1), PostgreSQL 9.4, YDB.

Previous
Next