Well, I have a "single votes" table that receives a "BOOLEAN" value in the columns "single vote1", "single vote2" and "single vote3", where 1 means that the person voted in that uniform and 0 otherwise the logical image of the table:
Withthiscommand:
SELECT(SELECTCOUNT(voto_uniforme1)FROMvotos_uniformeWHEREvotos_uniforme.voto_uniforme1=1)ASUniforme1,(SELECTCOUNT(voto_uniforme2)FROMvotos_uniformeWHEREvotos_uniforme.voto_uniforme2=1)ASUniforme2,(SELECTCOUNT(voto_uniforme3)FROMvotos_uniformeWHEREvotos_uniforme.voto_uniforme3=1)ASUniforme3
Itreturnsmethis:
But I need it to show me how a ranking, for example who has the highest number of votes comes first, who has the highest amount among the other two comes in second, and the lowest comes last in third, which would be the best way to do this?