Oracle / PLSQL: COVAR_POP Function

This article is written about how to use the Oracle/PLSQL COVAR_POP function with syntax and examples.

Description

The Oracle/PLSQL COVAR_POP function returns the population covariance of a set of number pairs.

Syntax

The syntax for the COVAR_POP function in Oracle/PLSQL is:

COVAR_POP( expression1, expression2 )

Parameters or Arguments

expression1

A numeric expression that is used in the calculation.

expression2

A numeric expression that is used in the calculation.

Returns

The COVAR_POP function returns a numeric value.

Note

The COVAR_POP function eliminates all pairs where expression1 or expression2 has a null value.

Applies To

The COVAR_POP function can be used in the following versions of Oracle/PLSQL:

Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i

Example

Let’s look at some Oracle COVAR_POP function examples and explore how to use the COVAR_POP function in Oracle/PLSQL.

For example:

select owner, COVAR_POP(avg_row_len, avg_space)
from all_tables
group by owner;