How can I select the distinct values and relative count from data that is stored as comma separated values in MySql?
This is how the data in the table looks like:
"Category" "Values"
"red" "D,A,D,D"
"yellow" "A,A,D,D"
Desire Output:
"red" "D" "3"
"red" "A" "1"
"yellow" "D" "2"
"yellow" "A" "2"
Can you think of a good way in mysql to get output like the way I've done? Thank's in advance.