aggregate
VAR_POP
Computes population variance using denominator N for N non-NULL observations. One observation gives zero; no observations give NULL. Example target: PostgreSQL 17; inline synthetic data; no extensions.
Formal Syntax & Structure
sql syntaxsql
VAR_POP(expression)Working Example
Example Snippetsql
WITH sample(id,x,y) AS (VALUES (1,1,2),(2,2,4),(3,3,6),(4,4,8),(5,NULL,4)) SELECT var_pop(x) FROM sample;