I have a table called "questionnaire" which has the following structure:
user_id | Q01 | Q02 | Q03 | 00001 | Yes | Yes | Yes | 00002 | Yes | No | Yes | 00003 | Yes | No | No |
I am figuring out on how to count the number of "Yes" for each User (user_id). For example:
00001 - 3 00002 - 2 00003 - 1
I just want to display the results without the UserID..
Before this, I have stored the Yes and No as "1" and "0", therefor I could use the following:
SELECT CONCAT(Q01+Q02+Q03) FROM `#__table` WHERE `id` = '[user_id]'
I cant seem to find the right query since its no longer an integer..