题解 | #试卷发布当天作答人数和平均分#
试卷发布当天作答人数和平均分
https://www.nowcoder.com/practice/5b58e89556dc4153a79d8cf8c08ba499
select b.exam_id ,count(distinct b.uid) as uv ,round(sum(score)/count(score),1) as avg_score from ( select exam_id,date_format(release_time,'%Y%m%d') as release_date from examination_info ) a join ( select *,date_format(start_time,'%Y%m%d') as start_date from exam_record ) b on a.exam_id=b.exam_id and a.release_date=b.start_date left join user_info c on b.uid=c.uid where score is not null and c.level>5 group by b.exam_id order by uv desc,avg_score
对“作答过”的定义能不能清晰一点...