SQL> select * from emp;
EMP_ID DEPT_ID EMP_NAME SALARY ------ ------ ---------- ---------- E01 D01 なまえ1 150 E02 D02 なまえ2 300 E03 D03 なまえ3 300 E04 D02 なまえ4 400 E05 D03 なまえ5 500 E06 D03 なまえ6
SQL> select 2 stddev( salary ) 3 from emp;
STDDEV(SALARY) -------------- 130.384048
SQL> select 2 dept_id, stddev( salary ) 3 from emp 4 group by dept_id;
DEPT_ID STDDEV(SALARY) ------ -------------- D01 0 D02 70.7106781 D03 141.421356