题解 | #试卷发布当天作答人数和平均分#
试卷发布当天作答人数和平均分
https://www.nowcoder.com/practice/5b58e89556dc4153a79d8cf8c08ba499
select er.exam_id,count(distinct u.uid) uv,round(avg(score),1) avg_score from exam_record er join examination_info ei on er.exam_id=ei.exam_id join user_info u on u.uid=er.uid where u.level>5 and ei.tag='SQL' group by er.exam_id order by uv desc,avg_score;
三表连接