I am having some issues with using inline view to create a column where I calculate the salary/total_sal * 100. My problem is that for some reason I am not getting the value for all employees, but only for the first.
select emp.ename, emp.sal,
( select (emp.sal / sum(emp.sal) * 100))
from emp;
I have tried to look around to see if I can find the answer, but I was unable to. Any help would be very helpful!