i have a User class which has a column called ‘device’ of type VARCHAR(255). This column basically contains the device types, for example string ‘iPhone 4S’, ‘iPod Touch 4G’, etc…
Is it possible (without loading ALL users and manually doing it) to figure out the total number of occurrences of each device?
So it would return:
iPhone: 50
iPad 2: 54
etc....
You’d just do this:
That would translate (more or less) to this SQL:
and you’d get a Hash mapping
deviceto the count incounts: