Results 1 to 7 of 7
Thread: Results of an online poll
Feb 10, 2013, 02:30 #1
Results of an online poll
Hello there, hope in your help.
I need extract from my mysql table the results of an online poll.
- I speak only English Yes No
- I speak only Spanish Yes No
- I speak English and a little bit of Spanish Yes No
- I speak Spanish and a little bit of English Yes No
- I speak English as well as Spanish Yes No
I tried this query:
SELECT SUM( IF ( I_speak_only_English = "Yes", 1, 0 ) ) AS `only_English` COUNT(*) AS `total` FROM tbl_poll GROUP BY names ORDER BY names DESC
Please tell me how to resolve this problem ...