Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Running total based on time

$
0
0

Hi,

Can someone help me how to get the running total based on the time, I have requirement where I need to calculate the running total of each ip for a certain period of time until the users leaves that ip, below is the sample data

DateIPCcAmountPoint
6/18/14 22:451.1.1.173a572
6/18/14 22:521.1.1.173a5152
6/18/14 23:071.1.1.173a5162
6/18/14 23:231.1.1.173a5152
6/18/14 23:381.1.1.173a542
6/18/14 23:421.1.1.164a511
6/18/14 23:451.1.1.173a582
6/18/14 23:531.1.1.173a5152
6/19/14 0:081.1.1.173a5152
6/19/14 0:231.1.1.173a5122
6/19/14 0:371.1.1.7a533
6/19/14 0:401.1.1.7a5153
6/19/14 0:551.1.1.7a5153
6/19/14 1:101.1.1.7a5153
6/19/14 1:251.1.1.7a5153
6/19/14 1:401.1.1.7a5153
6/19/14 1:551.1.1.7a5153
6/19/14 2:101.1.1.7a5153
6/19/14 2:251.1.1.7a5153
6/19/14 2:401.1.1.7a5153
6/19/14 2:551.1.1.7a5153
6/19/14 3:101.1.1.7a5153
6/19/14 3:251.1.1.7a5153
6/19/14 3:401.1.1.7a5153

I want to get the result something like this

IPCcAmountPoint
1.1.1.173a5572
1.1.1.164a511
1.1.1.173a5502
1.1.1.7a51983

Thanks in Advance.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>