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
18.104.22.168 2006.05.13. 18:26:00 Index
92.12.12 2006.05.13. 18:26:02 Page1
22.214.171.124 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.