December 2002
Intermediate to advanced
928 pages
85h 29m
English
VARIANCE ([DISTINCT | ALL]expr) [OVER (analytic_clause)]
Computes the sample variance of the values of a column or expression over the set of rows returned by a query or the set of rows specified by a GROUP BY clause. The sample standard deviation uses the number of rows returned by the query in the denominator. VAR_SAMP is almost identical to VARIANCE, but this function returns NULL when expr returns only one row, whereas VARIANCE returns 0 in that case.