题解 | #试卷发布当天作答人数和平均分#
试卷发布当天作答人数和平均分
https://www.nowcoder.com/practice/5b58e89556dc4153a79d8cf8c08ba499
select exam_record.exam_id,count(distinct exam_record.uid),round(avg(score),1) from exam_record left join examination_info on exam_record.exam_id= examination_info.exam_id left join user_info on user_info.uid=exam_record.uid where level>5 and date_format(start_time,'%Y-%m-%d')=date_format(release_time,'%Y-%m-%d') group by exam_record.exam_id order by count(distinct exam_record.uid) desc, avg(score)