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_samp( salary ) 3 from emp;
STDDEV_SAMP(SALARY) ------------------- 130.384048
SQL> select 2 dept_id, stddev_samp( salary ) 3 from emp 4 group by dept_id;
DEPT_ID STDDEV_SAMP(SALARY) ------ ------------------- D01 D02 70.7106781 D03 141.421356