题解 | #作答试卷得分大于过80的人的用户等级分布#
作答试卷得分大于过80的人的用户等级分布
https://www.nowcoder.com/practice/5bc77e3a3c374ad6a92798f0ead4c744
SELECT `level`, COUNT(*) level_cnt FROM user_info WHERE uid IN( SELECT uid FROM exam_record WHERE exam_id IN ( SELECT exam_id FROM examination_info WHERE tag = 'SQL' ) AND score > 80 ) GROUP BY `level` ORDER BY level_cnt DESC;