REGR_AVGY()
Average of the dependent variable of the regression line
DOUBLE PRECISION
REGR_AVGY ( <y>, <x> )
Parameter | Description |
---|---|
y |
Dependent variable of the regression line.It may contain a table column, a constant, a variable, an expression, a non-aggregate function or a UDF.Aggregate functions are not allowed as expressions. |
x |
Independent variable of the regression line.It may contain a table column, a constant, a variable, an expression, a non-aggregate function or a UDF.Aggregate functions are not allowed as expressions. |
The function REGR_AVGY
calculates the average of the dependent variable (y) of the regression line.
The function REGR_AVGY(<y>, <x>)
is equivalent to
SUM(<exprY>) / REGR_COUNT(<y>, <x>) <exprY> :== CASE WHEN <x> IS NOT NULL AND <y> IS NOT NULL THEN <y> END