REGR_AVGY
REGR_AVGY(expression1, expression2)
Section titled “REGR_AVGY(expression1, expression2)”- expression1: This parameter represents the independent variable, it is the input for the REGR_AVGY function in Oracle. Typically, it can be any numeric datatype or any nonnumeric datatype that can be implicitly converted to a numeric datatype.
- expression2: This is the dependent variable parameter in the REGR_AVGY function. Similar to expression1, it can be of any numeric type, or a nonnumeric type that can be implicitly converted to a numeric datatype. The function computes the average of this parameter value over the group of rows as specified by the GROUP BY clause.
Example
Section titled “Example”SELECT REGR_AVGY(column1, column2) FROM Table;Output
Section titled “Output”REGR_AVGY(column1, column2)0.75Explanation
Section titled “Explanation”REGR_AVGY calculates the average of the dependent variable (column1 in the example) in the regression line. In this case, the result 0.75 is the average of column1 values.