CORR
CORRβ
Descriptionβ
Syntaxβ
double corr(x, y)
Calculate the Pearson correlation coefficient, which is returned as the covariance of x and y divided by the product of the standard deviations of x and y. If the standard deviation of x or y is 0, the result will be 0.
exampleβ
mysql> select corr(x,y) from baseall;
+---------------------+
| corr(x, y) |
+---------------------+
| 0.89442719099991586 |
+---------------------+
1 row in set (0.21 sec)
keywordsβ
CORR