COVAR_SAMP
Returns the sample covariance for a set of expression pairs. The return value is of type DOUBLE PRECISION
. COVAR_SAMP
eliminates expression pairs where either expression in the pair is NULL
. If no rows remain, the function returns NULL
.
Syntax
SELECT COVAR_SAMP ( expression1, expression2 )
Parameters
expression1 |
The dependent DOUBLE PRECISION expression
|
expression2 |
The independent DOUBLE PRECISION expression
|
Example
=> SELECT COVAR_SAMP (Annual_salary, Employee_age) FROM employee_dimension; COVAR_SAMP ------------------- -9033.25143244343 (1 row)