I'm doing a QUIZ and at some point I have to show the percentage of the alternatives chosen by the users. I have this table:
ID RESPOSTA
1 a
2 a
3 b
4 b
5 c
6 a
The answer I need to have from MYSQL would be the percentages of choice:
a - 50% b - 33.33% c - 16.6%
How to do this? Tried with GROUP BY, but did not roll, any suggestions?