Count entries in enum field
Posted on 2007-04-03
I have entered survey data into a MySQL database. I have built reports to process much of the data, but I'm stuck on the best way to handle some enum fields.
I have four fields called Type1, Type2, Type3, Type4.
Type1 has the values "Full-time" & "Part-time"
Type 2 has "Solo" & "Group"
and so on.
I want to do a count query to return a report to tell me how many responded Full-time, Part-Time, Solo, Group, and so on for each option of each enum field.
I know I can do a separate query for each option of each field, but there has to be a more efficient way.