SELECT DEPARTMENT_ID, 

JOB_ID, 

COUNT(SALARY), 

SUM(SALARY)

FROM EMPLOYEES

GROUP BY DEPARTMENT_ID, JOB_ID,




OVER PARTITION BY 를 쓰면 GROUP BY 를 안써도 됨

SELECT DEPARTMENT_ID, 

JOB_ID, 

COUNT(SALARY) OVER ( PARTITION BY SALARY )

SUM(SALARY) OVER ( PARTITION BY SALARY)

FROM EMPLOYEES

GROUP BY DEPARTMENT_ID, JOB_ID,



'Oracle' 카테고리의 다른 글

실행계획  (0) 2017.03.06
START WITH CONNECT BY  (0) 2017.02.23
EXISTS  (0) 2017.02.21
EXPLAIN PLAN FOR  (0) 2017.02.20
rowid  (0) 2017.02.14

http://appsnuri.tistory.com/87

'PhoneGap' 카테고리의 다른 글

native method call  (0) 2012.02.01

select first_name, last_name, job_id

from employ a

where exists (select 1 from dual b

where a.job_id = 'IT_PROG');


EXISTS 다음 서브쿼리가 결과값을 가지면 보여진다.

'Oracle' 카테고리의 다른 글

실행계획  (0) 2017.03.06
START WITH CONNECT BY  (0) 2017.02.23
OVER PARTITION BY  (0) 2017.02.22
EXPLAIN PLAN FOR  (0) 2017.02.20
rowid  (0) 2017.02.14

+ Recent posts