Hi
Consider following data .
Date Country IP_Prefix
01/01/2018 UK 123.123
01/01/2018 UK 123.123
01/01/2018 UK 123.123
01/01/2018 UK 124.125
02/01/2018 UK 124.125
02/01/2018 France 99.200
02/01/2018 Fance 99.200
03/01/2018 Fance 99.200
04/01/2018 Fance 99.200
What I want to get is 3 columns:
c1= average number of events per day from a IP_Prefix in last 7 days
c2 = average number of events per 7 days in previous 28 days
c3= c1 / c3
So the output would like below table (new column values are for example only):
IP_Prefix c1 c2 c3
123.123 2 1 2
123.125 1 2 0.5
99.200 1 1 1
Can someone please help?
... View more