3 Replies Latest reply: Feb 17, 2013 11:20 AM by NSK2KSN RSS

    how to calculate emp_sal/total_salary_by_dept

    NSK2KSN
      select sal from emp;
      gives you individual salaries
      
      select sum(sal) from emp
      group by deptno;
      
      gives sum of salary department wise.
      
      I want a column with below result
      
      sal/sum(sal) -> sal department wise salary, please let me know how to get the required output