-2
10 users will answer a poll with 19 options equal to all, each answer is saved in the database in a table called 'votes' with the following structure: id: 1 - user_id: 1 - answer: {user response}
I want to count all 10 responses and show the most voted, for example. 3 people voted 'CASA'. 5 people voted 'WORK' option and 2 people voted 'LEISURE'.
How can I show that the most voted was WORK and that 5 people voted for her?
if the answer field is varchar-like you may have problems, but I believe all you need to do is a Count in the response field and group by user.
– Atila Augusto Dos Santos