我需要一个命令,可以从作者中挑选出最多的积极问题,例如,结果应如下所示:
Author WithTheMostMax
Author1 2
AUTHOR TABLE
AuthorID AuthorName
Author1 AuthorName1
Author2 AuthorName2
Author3 AuthorName3
问题列表
AuthorID Issues
Author1 1
Author2 0
Author3 0
Author1 1
答案 0 :(得分:0)
SELECT AuthorName, SUM(Issues) AS WithTheMostMax FROM issues_list INNER JOIN issues_list.AuthorID = author_table.AuthorID
GROUP BY AuthorName ORDER BY SUM(Issues) DESC
答案 1 :(得分:0)