MEDIAN function in Oracle

MEDIAN is one of the vital Numeric/Math functions of Oracle. It is used to get the MEDIAN value of an expression. The MEDIAN function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i.

Syntax:

MEDIAN( expression )

Parameters: expression: It is used to specify the expression whose median to be calculated.

Example:

select MEDIAN(marks)
from students
where section = 'Biology';

Explanation: The result will be the median marks for all students in the Biology section.

Please follow and like us:
Content Protection by DMCA.com