How to find Running Total Salary in SQL Server?


Select id,name,salary,(select SUM(salary) from emp e1 where e1.id<=e2.id) as Runningtotal
from emp e2
Share:

No comments:

Post a Comment

Wednesday, 11 June 2014

How to find Running Total Salary in SQL Server?


Select id,name,salary,(select SUM(salary) from emp e1 where e1.id<=e2.id) as Runningtotal
from emp e2

No comments:

Post a Comment

Popular

Total Pageviews

Archive