I have a table like this that keeps a total counts of a users against different types.
+----+--------+-------+------+ | id | sub_id | count | type | +====+===