MagnusArias

SBO | Odchylenie std SQL

Nov 30th, 2019
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.47 KB | None | 0 0
  1.  
  2. DROP AGGREGATE OdchStd
  3. GO
  4. DROP ASSEMBLY OdchStd
  5. GO
  6. CREATE ASSEMBLY OdchStd
  7. FROM 'C:\e740\repos\FunAggr2\FunAggr2\bin\Debug\FunAggr2.dll'
  8. WITH PERMISSION_SET = SAFE;
  9. GO
  10. CREATE AGGREGATE OdchStd(@s FLOAT)
  11. RETURNS FLOAT
  12. EXTERNAL NAME OdchStd.OdchStd;
  13. GO
  14.  
  15.  
  16. SELECT Dzialy.Nazwa, stdev(wzrost) AS [stdev], dbo.OdchStd(Wzrost) AS [odch], (stdev(wzrost) - dbo.OdchStd(Wzrost))/stdev(wzrost)
  17. FROM Dzialy LEFT JOIN osoby ON
  18. Dzialy.IdDzialu=Osoby.IdDzialu GROUP BY Dzialy.Nazwa
Add Comment
Please, Sign In to add comment