SQL> SELECT DEPTNO,SUM(SAL) 2 FROM EMP 3 GROUP BY ROLLUP(DEPTNO) 4 / DEPTNO SUM(SAL) ---------- ---------- 10 8750 20 10875 30 9400 29025 SQL> ED Wrote file afiedt.buf 1 SELECT NVL(TO_CHAR(DEPTNO),'TOTAL'),SUM(SAL) 2 FROM EMP 3* GROUP BY ROLLUP(DEPTNO) SQL> / NVL(TO_CHAR(DEPTNO),'TOTAL') SUM(SAL) ---------------------------------------- ---------- 10 8750 20 10875 30 9400 TOTAL 29025 SQL> ED Wrote file afiedt.buf 1 SELECT NVL(TO_CHAR(DEPTNO),'TOTAL'),SUM(SAL) 2 FROM EMP 3* GROUP BY CUBE(DEPTNO) SQL> / NVL(TO_CHAR(DEPTNO),'TOTAL') SUM(SAL) ---------------------------------------- ---------- TOTAL 29025 10 8750 20 10875 30 9400 SQL> ED Wrote file afiedt.buf 1 SELECT NVL(TO_CHAR(DEPTNO),'TOTAL'),JOB,SUM(SAL) 2 FROM EMP 3* GROUP BY ROLLUP(DEPTNO,JOB) SQL> / NVL(TO_CHAR(DEPTNO),'TOTAL') JOB SUM(SAL) ---------------------------------------- --------- ----------...
ERP Project Management,Asp.net,PL SQL Tips for error resolution,Research,Software Errors and solution,SQL 2014,2012,2008,Procedural language,SP,Power BI,excel macro ,Musical notations,Business software,Degree, diploma related informations.