Definition: In Oracle PL/SQL, the function REGR_AVGX is a linear regression analytic function which takes two numeric inputs and calculates average of the second argument (the independent variable) of a regression line. It completely ignores the pair of values where any of the arguments is NULL.

Example Syntax:

REGR_AVGX(x,y)

In the syntax, 'x' is referred to as the dependent variable and 'y' is referred to as the independent variable of the Regression Line.

Example Usage:

The SQL query below uses the REGR_AVGX function to calculate average of SAL in its partition created by DEPTNO.