Reputation: 2261
I have 3 different types of records. Let say 4 records are of type A, 1 record is of type B and 10 of type C. Some users have only A and B, and others all 3 types.
First, I need to retrieve the types, and then count how many records have the type A, B or C.
Is it possible to make it in one call, so that I get a Hash
from the database like following:
A:4, B:1, C:10
Upvotes: 2
Views: 727