[RollUp함수] 자동으로 소계/합계를 구해주는 함수 group by절에 주어진 조건으로 소계값을 구해준다.

select deptno 부서번호, position 직위, sum(pay) 총급여 from professor group by position, rollup(deptno);

select position, count(*), sum(pay) from professor group by rollup(position);

[Cube함수] - 전체 총합계까지 출력하려면 cube

HAVING절은 집계함수를 가지고 있다 GROUP BY절은 X