SELECT deptno,job,MAX(sal) FROM scott.emp GROUP BY cube(deptno,job);
DEPTNO JOB MAX(SAL)
---------- --------- ----------
5000
CLERK 1300
ANALYST 3000
MANAGER 2975
SALESMAN 1600
PRESIDENT 5000
10 5000
10 CLERK 1300
10 MANAGER 2450
10 PRESIDENT 5000
20 3000
20 CLERK 1100
20 ANALYST 3000
20 MANAGER 2975
30 2850
30 CLERK 950
30 MANAGER 2850
30 SALESMAN 1600
18 ROWS selected.
No comments:
Post a Comment