mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-16 04:32:33 +00:00
862 B
862 B
title | slug | sidebar_position |
---|---|---|
varPop | /en/sql-reference/aggregate-functions/reference/varPop | 210 |
varPop
Calculates the population variance.
Syntax
varPop(x)
Alias: VAR_POP
.
Parameters
Returned value
- Returns the population variance of
x
.Float64
.
Example
Query:
DROP TABLE IF EXISTS test_data;
CREATE TABLE test_data
(
x UInt8,
)
ENGINE = Memory;
INSERT INTO test_data VALUES (3), (3), (3), (4), (4), (5), (5), (7), (11), (15);
SELECT
varPop(x) AS var_pop
FROM test_data;
Result:
┌─var_pop─┐
│ 14.4 │
└─────────┘