题解 | #每类试卷得分前3名#
每类试卷得分前3名
https://www.nowcoder.com/practice/255aa1863fe14aa88694c09ebbc1dbca
select * from (select tag,uid,rank()over(partition by tag order by max desc,min desc,uid desc ) ranking from ( select tag,uid,max(score) max,min(score) min from examination_info a left join exam_record b on a.exam_id = b.exam_id where b.submit_time is not null group by tag,uid ) c)d where ranking <4;