SQL SELECT with time range
- by nLL
Hi, I have below click_log table logging hits for some urls
site ip ua direction hit_time
-----------------------------------------------------
1 127.0.0.1 1 20010/01/01 00:00:00
2 127.0.0.1 1 20010/01/01 00:01:00
3 127.0.0.1 0 20010/01/01 00:10:00
.... .........
I want to select incoming hits (direction:1) and group by sites that are:
from same ip and browser
logged within 10 minutes of each other
occured more than 4 times in 10 minutes.
I'm not sure if above was clear enough. English is not my first language. Let me try to explain with an example.
If site 1 gets 5 hits from same ip and browser with in 10 minutes after getting first unique hit from that ip and browser i want it to be included in the selection.
Basically I am trying to find abusers.