select
substring_index(
substring_index(
a.name,';',
b.help_topic_id +1),';',-1)AS name,count(id)as total
fromdefault.test as a
JOIN mysql.help_topic b
ON b.help_topic_id <(
length(a.name)- length(REPLACE(a.name,';',''))+1)where created between'%startday%'and'%endday%'and name!=''groupby1orderby total desclimit1,30