By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,589 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,589 IT Pros & Developers. It's quick & easy.

i want to know rate of total salary for each department

P: 5
i 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.empno
group by emp.deptno

i tried this query but did not worked

hope for early reply

abbas
Mar 30 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.