need to know (%) percentage or rate of each department sahring salary from the total salary
eg total salary is 1000
dept a=200
dept b=350
and dept c=450
eg (then 200/(1000)*100=20%)
select emp.deptno,sum( emp.sal)/sum(e.sal)*100 from emp,emp e
where emp.empno=e.emp no
group by emp.deptno
i tried this query but did not worked
hope for early reply
abbas
eg total salary is 1000
dept a=200
dept b=350
and dept c=450
eg (then 200/(1000)*100=20%)
select emp.deptno,sum( emp.sal)/sum(e.sal)*100 from emp,emp e
where emp.empno=e.emp no
group by emp.deptno
i tried this query but did not worked
hope for early reply
abbas
Comment