corr()

Calculates the Pearson correlation coefficient for each group. It eliminates expression pairs where either expression in the pair is NULL or not numeric.

Syntax

corr(X_EXPR, Y_EXPR)
X_EXPR
Numeric expression
Y_EXPR
Second numeric expression

Usage

json "{}" 
| repeat count=100 | eval n1=seq(), n2=sqrt(seq()) 
| stats corr(n1, n2)