CORR function in Oracle

CORR is one of the vital Analytic functions of Oracle. It is used to get the coefficient of correlation of a set of number pairs. The CORR function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i. Syntax:

CORR ( x, y )

Parameters: x, y: It is used to specify the numbers to be used for calculation.

Example:

select CORR (id, name)
from students;

Explanation: Here, the coefficient of correlation will be returned for the values in the ‘id’ and ‘name’ columns of the ‘students’ table.

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