COVAR_POP() GROUP BY ...
All functions > GROUP BY > COVAR_POP() GROUP BY ...
Returns the population covariance between two expressions.
Syntax
Diagram(
Sequence(
Terminal("COVAR_POP"),
Terminal("("),
NonTerminal("expr_y"),
Terminal(","),
NonTerminal("expr_x"),
Terminal(")"),
Choice(0, Skip(),
Sequence(
Terminal("FILTER"),
Terminal("("),
Terminal("WHERE"),
NonTerminal("condition"),
Terminal(")")
)
),
Choice(0, Skip(),
Sequence(
Terminal("GROUP BY"),
OneOrMore(NonTerminal("feature"), Terminal(","))
)
)
)
)| Parameter | Type | Required | Description |
|---|---|---|---|
expr_y | T | Yes | The dependent variable (y) |
expr_x | T | Yes | The independent variable (x) |
condition | BOOLEAN | No | The condition to filter the values before aggregation |
feature | FEATURE | No | The features to group by (many features are supported) |
Notes
- Computes the population covariance (divides by N)
- NULL values in either expression are excluded from the calculation
- Returns NULL if fewer than 2 non-NULL pairs exist