Adding Column value from Previous Row based on Where Condition. I have a table with symbol, epoch and Volume. The epoch is stored based on Symbol and Epoch in ascending order. 



I want to get cumulative volume which is sum of volume and prev timestamp and the volume at current timestamp for the same day and for same symbol. 



I am new to SQL and this already seems to be quite complicated. Pls help.
Try using over clause.
Over Clause Documentation

Select Symbol,
       Epoch,
       Volume,
       Sum(Volume)Over(Partition by Symbol,Substring(Epoch,1,6) Order by Epoch) AS CuVol
From YourTableName