Hi I have a table with the following columns and some sample data:
IP Timestamp Page
123.12.12 2006.05.13. 18:22:27 Index
123.12.12 2006.05.13. 18:23:24 Contact
123.12.12 2006.05.13. 18:24:07 Index
123.12.12 2006.05.13. 18:25:45 Page1
92.12.1.2 2006.05.13. 18:26:00 Index
92.12.12 2006.05.13. 18:26:02 Page1
32.12.1.1 2006.05.13. 18:30:02 Page1
Basically, this is a log from my webstats, and I would like to make the following SQL query:
Count distinct IP addresses for a day, and if an IP is repeated within thirty minutes of its first occurrence, count it only as one. If this IP address occurs again after this thirty minutes count it as new visit and perform the same check.
Basically, with this query, I would get the unique visitors to my site.
Can someone please help?
Thank you,
Gyuri
IP Timestamp Page
123.12.12 2006.05.13. 18:22:27 Index
123.12.12 2006.05.13. 18:23:24 Contact
123.12.12 2006.05.13. 18:24:07 Index
123.12.12 2006.05.13. 18:25:45 Page1
92.12.1.2 2006.05.13. 18:26:00 Index
92.12.12 2006.05.13. 18:26:02 Page1
32.12.1.1 2006.05.13. 18:30:02 Page1
Basically, this is a log from my webstats, and I would like to make the following SQL query:
Count distinct IP addresses for a day, and if an IP is repeated within thirty minutes of its first occurrence, count it only as one. If this IP address occurs again after this thirty minutes count it as new visit and perform the same check.
Basically, with this query, I would get the unique visitors to my site.
Can someone please help?
Thank you,
Gyuri