3 Replies Latest reply on Feb 17, 2013 5:20 PM by NSK2KSN

    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