Aggregate. Returns the sum of products of the dependent and independent variables. The REGR_SXY function can be used to evaluate the statistical validity of a regression model.
REGR_SXY( dependent-expression , independent-expression )
dependent-expression | The variable that is affected by the independent variable. |
independent-expression | The variable that influences the outcome. |
REGR_COUNT( x, y ) * COVAR_POP( x, y )
SQL/2003 SQL foundation feature (T621) outside of core SQL.
The following example returns the sum of products of the dependent and independent variables.
SELECT REGR_SXY()( Salary, ( 2008 - YEAR( BirthDate ) ) ) FROM Employees group by depart_IDWith a window:
SELECT REGR_SXY()( Salary, ( 2008 - YEAR( BirthDate ) ) ) FROM Employees KEEP 10 ROWS