SELECT
b.name,
a.module_id AS moduleid,
a.topic_id AS topicid,
a.topic_name AS topicname,
COUNT(*) AS num
FROM`comment` a
LEFTJOIN application_tree b ON a.module_id = b.id
WHERE
a.library_id = 6GROUPBY
a.topic_id,
a.topic_name,
a.module_id,
b. name;
查询查询此表中library_id=6的以topic_id和topic_name为一组的数量SELECT topic_id AS topicid,topic_name AS topicname,COUNT(*) AS num FROM `comment` WHERE library_id = 6 GROUP BY topic_id,topic_name; 关于两个表的连接查询表一表二让表一的modu