Previous Topic: UppercaseNext Topic: Variance population


Variance

Returns the variance of the values in column-name (the square of the standard deviation).

The variance function uses the n-1, sample, method.

This function calculates variance using the formula shown below:

This function calculates variance

Syntax:

►►─── VAR ── (column-name) ───────────────────────────────────────────────────►◄

Invocation names:

VAR

Parameters:

column-name

Specifies the list of values on which the variance is calculated.

Example:

The variance function in this example displays the variance between the rows in SALARY-MANAGER:

select var(salary-manager) as 'VARIANCE SALARY'
  from employee group by job-id