doubledee Posted June 27, 2012 Share Posted June 27, 2012 I have a table which keeps track of every visit by other people, like this... visitor_id ------------ 1 1 1 2 3 2 If I just did a COUNT, it would yield 6, but I want to get back that 3 unique people visited Debbie's Profile, if you follow me?! How do I do that in SQL? Thanks, Debbie Quote Link to comment https://forums.phpfreaks.com/topic/264903-count-unique-visitors/ Share on other sites More sharing options...
kicken Posted June 27, 2012 Share Posted June 27, 2012 use COUNT(DISTINCT visitor_id) in your query. Quote Link to comment https://forums.phpfreaks.com/topic/264903-count-unique-visitors/#findComment-1357550 Share on other sites More sharing options...
doubledee Posted June 27, 2012 Author Share Posted June 27, 2012 use COUNT(DISTINCT visitor_id) in your query. That did it. Thanks!!! Debbie Quote Link to comment https://forums.phpfreaks.com/topic/264903-count-unique-visitors/#findComment-1357557 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.