Computes the standard deviation of a sample consisting of a numeric expression as a double. stdev and stddev are aliases for stddev_samp, and use the same syntax.
stddev_samp ( [ all | distinct ] expression )
select type, avg(advance) as "avg", stddev_samp(advance) as "stddev" from titles where total_sales > 2000 group by type order by type
Computes the sample 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 sample variance.
See also Transact-SQL Users Guide.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute stddev_samp.