表机构,统计name的数量

sql语句   mysql.help_topic    id自增的临时表

select (substring_index(substring_index(a.name,\’;\’,b.help_topic_id+1),\’;\’,-1)) \’name\’,COUNT(\’abc\’) \’count\’

from  test_group a

join mysql.help_topic b on b.help_topic_id < (length(a.name) – length(replace(a.name,\’;\’,\’\’))+1)

group by `name`

 

结果:

参考:https://blog.csdn.net/xcymorningsun/article/details/73436568

 

版权声明:本文为my0901原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/my0901/p/9298769.html