Like having a wild-card option to generate new column which aggregate all values as
select * from
(
select
sal, deptno, job
from
emp
)
pivot
(
sum(sal) for deptno in (10,20,30,'*' as TOTAL)
);
JOB 10 20 30 TOTAL
--------- ---------- ---------- ---------- ---------
CLERK 1300 1900 950 4150
SALESMAN 5600 5600
PRESIDENT 5000 5000
MANAGER 2450 2975 2850 8275
ANALYST 6000 6000
Or Something like this....