Query to obtain cumulative sum or running total from employee table for salary column.
select Employee_id, Salary,
SUM(Salary) OVER (ORDER BY Employee_id)
As RunningTotal
from employee;
Blogger, Engineer & Entrepreneur
Query to obtain cumulative sum or running total from employee table for salary column.
select Employee_id, Salary,
SUM(Salary) OVER (ORDER BY Employee_id)
As RunningTotal
from employee;
Facebook Comments