0

Hi I want to calculate weighted standard deviation in SQL Server 2012.

Is there any inbuilt function as of standard deviation in SQL Server or how to built a user define function in SQL Server.

  • I want Weighted Standard Deviation – user2239073 Apr 16 '13 at 09:59
  • 1
    possible duplicate of [weighted standard deviation in sql server without aggregation error](http://stackoverflow.com/questions/10947180/weighted-standard-deviation-in-sql-server-without-aggregation-error) – nothrow Jan 29 '14 at 15:14

2 Answers2

0

There is no built-in function (a similar question was asked before by the way, although there is no accepted answer). Your most obvious options are:

Community
  • 1
  • 1
Pondlife
  • 15,992
  • 6
  • 37
  • 51
-1

There is - check out the documentation on MSDN

Example from MSDN:

USE AdventureWorks2012;
GO
SELECT STDEV(Bonus)
FROM Sales.SalesPerson;
GO

Here is another one to get you started http://blog.sqlauthority.com/2008/01/20/sql-server-introduction-to-statistical-functions-var-stdevp-stdev-varp/

ScottS
  • 452
  • 4
  • 5