使用oracle来计算方差及标准差
时间:2021-07-01 10:21:17
帮助过:7人阅读
AS "VAR_POP", --方差
VAR_SAMP (sal) OVER (PARTITION BY deptno ORDER BY hiredate)
AS "VAR_SAMP" --样本方差
FROM scott.emp
WHERE deptno IN (20);
/* Formatted on 5/24/2012 4:15:58 PM (QP5 v5.149.1003.31008) */
SELECT deptno,
STDDEV (sal) AS "STDDEV", --标准差
STDDEV_SAMP (sal)
AS "STDDEV_SAMP", --样本标准差
VAR_POP (sal)
AS "VAR_POP", --方差
VAR_SAMP (sal)
AS "VAR_SAMP" --样本方差
FROM scott.emp
group by deptno
使用oracle来计算方差及标准差
标签: