- Categories:
Aggregate functions (Linear Regression) , Window function syntax and usage
REGR_ COUNT¶
Returns the number of non-null number pairs in a group.
Syntax¶
Aggregate function
Window function
Arguments¶
yThe dependent variable. This must be an expression that can be evaluated to a numeric type.
xThe independent variable. This must be an expression that can be evaluated to a numeric type.
expr3This is the optional expression used to group rows into partitions.
Important
Note the order of the arguments; the dependent variable is first.
Returns¶
If any of the input expressions is of type DECFLOAT, the returned type is DECFLOAT. Otherwise, the returned type is FLOAT.
Usage notes¶
- DISTINCT is not supported for this function.
- When this function is called as a window function, it does not support:
- An ORDER BY clause within the OVER clause.
- Explicit window frames.
Examples¶
Show the number of pairs in each group, and the number of those pairs in which neither member is NULL.