select d.department_name, e.first_name, e.salary, sum(e.salary) over (partition by e.department_id order by e.first_name) running_total
from employees e
left join departments d on e.department_id = d.department_id
order by d.department_name, e.first_name
No comments:
Post a Comment