aboutsummaryrefslogtreecommitdiff
path: root/sql/hive/src/test/resources/golden/udaf_covar_pop-4-7af9231ae293d0c4b84050176e1d73ad
blob: 7323e72fccc7c92f3a3b7838839136cc619214d6 (plain) (blame)
1
2
3
4
5
6
covar_pop(x,y) - Returns the population covariance of a set of number pairs
The function takes as arguments any pair of numeric types and returns a double.
Any pair with a NULL is ignored. If the function is applied to an empty set, NULL
will be returned. Otherwise, it computes the following:
   (SUM(x*y)-SUM(x)*SUM(y)/COUNT(x,y))/COUNT(x,y)
where neither x nor y is null.