I've got a mySQL database of survey responses. Each one has a userID, a questionID and the actual answer. Now I'm trying to write a report that will tell me how many people actually completed the survey as opposed to stopped halfway through. So I'm trying to figure out how to write a query that will count all of the userIDs that are duplicated exactly 91 times.
Be gentle, this is my first stackoverflow question.
You have to group by having count(*) = 91
select userId from myTable group by userId having count(*) = 91
http://dev.mysql.com/doc/refman/5.0/en/group-by-hidden-columns.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With