Computes the standard deviation of a population consisting of a numeric expression, as a double. stdevp is an alias for stddev_pop, and uses the same syntax.
stddev_pop ( [ all | distinct ] expression )
applies stddev_pop to all values. all is the default.
eliminates duplicate values before stddev_pop is applied.
is the expression—commonly a column name—in which its population-based standard deviation is calculated over a set of rows.
The following statement lists the average and standard deviation of the advances for each type of book in the pubs2 database.
select type, avg(advance) as "avg", stddev_pop(advance) as "stddev" from titles group by type order by type
Computes the population standard deviation of the provided value expression evaluated for each row of the group (if distinct was specified, then each row that remains after duplicates have been eliminated), defined as the square root of the population variance.
Figure 2-3: The formula for population-related statistical aggregate functions
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute stddev_pop.
For general information about aggregate functions, see “Aggregate functions”.
Functions stddev_samp, var_pop, var_samp