Hi.
I am trying to count how many queries are made in a year,
but queries made in 30 days are regarded as 1 time only.
As shown in the following example, the last query is on 8/8,
so queries made between 7/10-8/8(i.e., 7/21, 7/29, 8/2 and 8/8)
are counted as only 1 time.
Secondly, 4/3, 3/29 and 3/20 are counted as 1 time.
Lastly, 2/19 is counted as 1 time.
So the result is 3.
How do I calculate such case by using -bysort-?
query_date (from-to: 2013/1/1-2013/12/31)
2013/2/19
2013/3/20
2013/3/29
2013/4/3
2013/7/21
2013/7/29
2013/8/2
2013/8/8
I am trying to count how many queries are made in a year,
but queries made in 30 days are regarded as 1 time only.
As shown in the following example, the last query is on 8/8,
so queries made between 7/10-8/8(i.e., 7/21, 7/29, 8/2 and 8/8)
are counted as only 1 time.
Secondly, 4/3, 3/29 and 3/20 are counted as 1 time.
Lastly, 2/19 is counted as 1 time.
So the result is 3.
How do I calculate such case by using -bysort-?
query_date (from-to: 2013/1/1-2013/12/31)
2013/2/19
2013/3/20
2013/3/29
2013/4/3
2013/7/21
2013/7/29
2013/8/2
2013/8/8
Comment