SQLite Forum

running total
Login
I need some help regarding a running total.I am using sqlite 3.2 on a windows 7 version. I have a qtydel and a qtyrec column. qtydel - qtyrec gives me a total for a column called RT. How do I get a running total of RT.. I tried using the following:
 Sum(qtydel) - Sum(qtyrec) + COALESCE(BFD, 0) AS RT,
 SUM(RT) OVER(ROWS UNBOUNDED PRECEDING) AS NoOfCyl,