VAR_POP() GROUP BY ...

All functions > GROUP BY > VAR_POP() GROUP BY ...

Returns the population variance of the values in the group.

Syntax

VAR_POP(expr)
 [ FILTER (WHERE condition) ]
  [ GROUP BY feature [, feature ...] ]

Notes

  • Computes the population variance (divides by N)
  • NULL values are excluded from the calculation
  • Returns NULL if all values are NULL or group is empty

Examples

FeatureQL
SELECT
    -- Population variance
    f1 := ZIP(ARRAY(1, 2, 3, 4) AS value).TRANSFORM(SELECT VAR_POP(value)).UNWRAP_ONE()
;
Result
f1 VARCHAR
1.25

Last update at: 2026/06/20 10:08:10