SELECT substring_index(substring_index(a.AuditOpinionCodes, ',', b.help_topic_id + 1), ',', - 1) AS opinionCode,count(1) as total
FROM smokeaudit a
INNER JOIN mysql.help_topic b ON b.help_topic_id < (length(a.AuditOpinionCodes) - length(REPLACE(a.AuditOpinionCodes, ',', '')) + 1)
where a.AuditTime >='2021-02-01 00:00:00' and OperatingType=0 and OperatingValid=1 GROUP BY s.RSStationCode,opinionCode