题解 | #试卷发布当天作答人数和平均分#
试卷发布当天作答人数和平均分
https://www.nowcoder.com/practice/5b58e89556dc4153a79d8cf8c08ba499
select
exam_id,
count(distinct uid) as uv,
round(sum(score) / count(uid), 1) as avg_score
from exam_record
join examination_info
using (exam_id)
join user_info
using (uid)
where tag = 'SQL' and level > 5 and date(submit_time) = date(release_time)
group by exam_id, date(release_time)
order by uv desc, avg_score
查看1道真题和解析