VAR_POP

functionsupportedCore SQL functions

docs.snowflake.com ↗

Aggregate functionsWindow function syntax and usage

Returns the population variance of non-NULL records in a group. If all records inside a group are NULL, a NULL is returned.

Syntax

supportedpartialnot supportednot scored

Aggregate function

VAR_POP( [ DISTINCT ] <expr1> )

Window function

VAR_POP( [ DISTINCT ] <expr1> ) OVER (
                                     [ PARTITION BY <expr2> ]
                                     [ ORDER BY <expr3> [ { ASC | DESC } ] [ NULLS { FIRST | LAST } ] [ <window_frame> ] ]
                                     )

Parameters

NameRequiredDescription
expr1requiredThe expr1 should evaluate to one of the numeric data types.
expr2requiredThis is the optional expression to partition by.
expr3requiredThis is the optional expression to order by within each partition.

Returns

The data type of the returned value is NUMBER(<precision>, <scale>). The scale depends upon the values being processed.

Usage notes