check this, its kind of running sum requirement you have.
Use-Of-Self-Joins-Instead-Of-Cursor-Or-While-Loop[
^]
Instead of adding , write the logic of subtraction.
Also you can do this
select vID , Amt, Row_Number() Over (Partition by Vid Order by Vid) As ROWID into #temp
from table
select b.Vid,B.Amt-A.amt
from
(select * from #temp Where ROWID=2 ) b
Join
(select * from #temp Where ROWID=1 ) a
On b.Vid=a.Vid