Skip to main content

VAR

Returns the statistical variance of all values in the specified expression.

Syntax

VAR ( [ DISTINCT ] expression  )  

Arguments

expression
An expression of numeric data type category.

DISTINCT Specifies that each unique value is considered.

Return Type

Returns a FLOAT64.

Examples

This example returns the variance for all prices in the pricing blockchain.

SELECT VAR(price) FROM pricing;

Response:

VAR(PRICE) [FLOAT64]    
2378.5517757630137