Computes the statistical variance of a sample consisting of a numeric-expression, as a double, and returns the variance of a set of numbers. var and variance are aliases of var_samp, and use the same syntax.
var_samp ( [ all | distinct] expression )
select type, avg(advance) as "avg", var_samp(advance) as "variance" from titles where total_sales > 2000 group by type order by type
var_samp returns a result of double-precision floating-point datatype. If applied to the empty set, the result is NULL.
For general information about aggregate functions, see Aggregate Functions in Transact-SQL Users Guide.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute var_samp.