VAR#
Returns the statistical variance of all values in the specified expression. May be followed by the OVER clause.
Syntax#
VAR ( [ ALL | DISTINCT ] expression )
OVER ( [ partition_by_clause ] order_by_clause )
Arguments#
_expression_
Is an expression of the exact numeric or approximate numeric data type category, except for the bit data type. Aggregate functions and subqueries are not permitted.
Return types#
float
Examples#
SELECT VAR([IntNotNullColumn]) AS [Var] FROM [IntTable]