I've got a MySQL table containing 115 fields like these:
v1q1 v1q2 v2q1 v2q2 v3q1 v3q3 (...)
The records all contain one of the value 0, 1, 2, 3 or 4.
Now I need to count for every field the number of records containing a 0, the number of records containing a 1, the number of records containing a 2,... (until 4).
How I can accomplish this in a rather efficient way?