GROUP BY and COUNT using ActiveRecord
Distinct and Group By are going to give you different results. To get the results you expect you’ll want to use Seen above, group will return things as a hash. While distinct just returns the number of people in total, seen below.