select sclass_id ,count(*)as sl from(
SELECT
SUBSTRING_INDEX(
SUBSTRING_INDEX(
a.ldxm
,
‘,’,
b.help_topic_id + 1
),
‘,’ ,- 1
) sclass_id
FROM
1_6_ndyxldmkzzzdjyjxhdqkylb a
JOIN mysql.help_topic b ON b.help_topic_id < (
LENGTH(a.ldxm
) - LENGTH(
REPLACE (a.ldxm
, ‘,’, ‘’)
) + 1
))aaa