Calculating standard deviation
Calculating the standard deviation is quite common when dealing with numeric columns. In this exercise, you will calculate the running standard deviation, similar to the running total you calculated in the previous lesson.
Bu egzersiz
Intermediate SQL Server
kursunun bir parçasıdırEgzersiz talimatları
Create the window, partition by TerritoryName and order by OrderDate to calculate a running standard deviation of OrderPrice.
Uygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
SELECT OrderDate, TerritoryName,
-- Calculate the standard deviation
___
OVER(PARTITION BY TerritoryName ORDER BY OrderDate) AS StdDevPrice
FROM Orders