题解 | #试卷发布当天作答人数和平均分#
试卷发布当天作答人数和平均分
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 submit_time is not null
group by exam_id, date(release_time)
order by uv desc, avg_score

查看11道真题和解析