powelly Posted August 20, 2007 Share Posted August 20, 2007 I have the following data recording visitors to a site. DATE IPADDRESS 01/01/2007,192.168.1.1 01/01/2007,192.168.1.2 10/01/2007,192.168.1.1 10/01/2007,192.168.1.2 10/01/2007,192.168.1.3 11/01/2007,192.168.1.1 I want to select the number of unique ipaddresses per date and return something like this Date,UniqueIPs 01/01/2007,2 10/01/2007,3 11/01/2007,1 Could someone be kind enough to point me in the right direction? Quote Link to comment Share on other sites More sharing options...
kirk112 Posted August 20, 2007 Share Posted August 20, 2007 Something like this? SELECT COUNT(IPADDRESS) AS UniqueIPs, DATE FROM table_name GROUP BY IPADDRESS, DATE ORDER BY DATE Quote Link to comment Share on other sites More sharing options...
powelly Posted August 20, 2007 Author Share Posted August 20, 2007 Perfect Thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.