题解 | #获得积分最多的人(一)#
获得积分最多的人(一)
https://www.nowcoder.com/practice/1bfe3870034e4efeb4b4aa6711316c3b
SELECT name, SUM(grade_num) AS grade_num FROM ( SELECT U.name AS name, G.grade_num AS grade_num FROM grade_info AS G LEFT JOIN user AS U ON U.id = G.user_id ) AS J GROUP BY name ORDER BY grade_num DESC LIMIT 1;