https://blog.csdn.net/HibonLi/article/details/72897486
SELECT
count( * ) as 激活数量,GROUP_CONCAT(a.type separator ‘;‘) ,d.severity=‘1‘ as 1级BUG,d.severity=‘2‘ as 2级BUG
FROM
zt_bug a
LEFT JOIN zt_bug d ON a.id = d.id
WHERE
a.product = ‘189‘
AND a.STATUS = ‘active‘ GROUP BY a.type,d.severity
GROUP_CONCAT(a.type separator ';'),对统计出来的值在某一字段进行拼接展示
原文:https://www.cnblogs.com/ruijie/p/14958186.html