0
How to use sum?
I have entered an employee who have worked two times a week and many other single day now I want to calculate total salary earned by each employee in one view. The rate and hours are separately stored in table with staffid.
1 Respuesta
+ 1
It's hard without seeing the tables... but let's make a guess:
select employee_id, sum(hours), sum(hours*rate)
from hours_worked
group by employee_id