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.
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.
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:
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/