Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

total sum with pivot

874273Jul 17 2016 — edited Jul 20 2016

Hi Masters,

how can I get total sum salary for each desg and each dept using pivot in oracle. I am using oracle11.2.

select * from (select deptno,job,sal from emp)

pivot(sum(sal) for deptno in (10,20,30));

How can I get total sum value row wise and colum wise.. Please advise...

JOB                10     20     30       Total

CLERK13001900950
SALESMAN5600
PRESIDENT5000
MANAGER245029752850
ANALYST6000

Total              

Regards

Ar

This post has been answered by Stew Ashton on Jul 17 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2016
Added on Jul 17 2016
2 comments
30,004 views