Skip to content

REGR_AVGY

  • 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.
SELECT REGR_AVGY(column1, column2) FROM Table;
REGR_AVGY(column1, column2)
0.75

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.