Aggregate. Returns an integer that represents the number of non-NULL number pairs used to fit the regression line.
REGR_COUNT( dependent-expression , independent-expression )
dependent-expression | The variable that is affected by the independent variable. |
independent-expression | The variable that influences the outcome. |
This function returns a LONG as the result.
SQL/2003 SQL foundation feature (T621) outside of core SQL.
The following example returns the number of non-NULL pairs that were used to fit the regression line.
SELECT REGR_COUNT()( Salary, ( 2008 - YEAR( BirthDate ) ) ) FROM Employees group by depart_IDWith a window:
SELECT REGR_COUNT()( Salary, ( 2008 - YEAR( BirthDate ) ) ) FROM Employees KEEP 10 ROWS