题解 | #作答试卷得分大于过80的人的用户等级分布#明明说保证数量都不同,还是有相同的
作答试卷得分大于过80的人的用户等级分布
http://www.nowcoder.com/practice/5bc77e3a3c374ad6a92798f0ead4c744
select t.level,count(distinct t.uid) as level_cnt from ( select t1.uid,t1.level from user_info t1 join exam_record t2 on t1.uid = t2.uid join examination_info t3 on t2.exam_id = t3.exam_id where t3.tag = 'SQL' and t2.score > 80 ) t group by t.level order by level_cnt desc,level desc