I need to find the total number of occurrence of a specific values in columns.
eg:
In the below image of my mysql table structure i have fields like essc_a1
, essc_a2
... essc_a10
.
a1
to a10
entries coming from a group of ten questions.I need to find the number of occurrence of a value (for eg: "eg" or "S") in a1 to a10 columns.
I tried the following query but not working for me.
SELECT
COUNT(essc_a1,essc_a2,...,essc_a10) as count
FROM
employee_satisfaction_survey_checklist
GROUP BY
essc_a1, essc_a2,..., essc_a10
WHERE
essc_a1 LIKE '% es %'
OR essc_a2 LIKE '% es %'
OR .... essc_a10 LIKE '% es %';
Please help me.