Oracle Analytic Function - Oracle/PLSQL CORR Function

This Oracle tutorial explains how to use the Oracle/PLSQL CORR function.

The Oracle/PLSQL CORR function returns the coefficient of correlation of a set of number pairs.


The syntax for the Oracle/PLSQL CORR function is:

CORR( n ,m ) [ over (analytic_clause) ]

n and m are the numbers to use to calculate the cofficient of correlation.

The CORR function requires at least two rows.


select CORR(quantity, commission)
 from sales;