Connecting Tech Pros Worldwide Forums | Help | Site Map

Using aggregate fucntion to calculate standard deviation

Newbie
 
Join Date: Oct 2009
Posts: 1
#1: Oct 14 '09
How can i use aggregate function like count, sum and other to calculate standard deviation in SQL

ck9663's Avatar
Expert
 
Join Date: Jun 2007
Posts: 1,925
#2: Oct 14 '09

re: Using aggregate fucntion to calculate standard deviation


What do you have so far?


--- CK
Delerna's Avatar
Expert
 
Join Date: Jan 2008
Location: Sydney
Posts: 790
#3: Oct 14 '09

re: Using aggregate fucntion to calculate standard deviation


Use the SQL server STDEV function

Example from SQL Server help docs

STDEV
Returns the statistical standard deviation of all values in the given expression.

Expand|Select|Wrap|Line Numbers
  1. USE pubs
  2. SELECT STDEV(royalty)
  3. FROM titles
  4.  
nbiswas's Avatar
Member
 
Join Date: May 2009
Location: India
Posts: 33
#4: 2 Weeks Ago

re: Using aggregate fucntion to calculate standard deviation


It is STDEV as what Mr. Delerna replied.

Reref to this linkhttp://msdn.microsoft.com/en-us/library/ms190474.aspx for more info
Reply