题解 | #试卷发布当天作答人数和平均分#

试卷发布当天作答人数和平均分

https://www.nowcoder.com/practice/5b58e89556dc4153a79d8cf8c08ba499

select er.exam_id,count(distinct er.uid) as uv,round(avg(score),1) as avg_score
from exam_record as er
left join examination_info as ei using(exam_id)
left join user_info as ui using (uid)
where er.uid in
(
select er.uid
from exam_record as er
left join examination_info as ei using(exam_id)
left join user_info as ui using (uid)
where date_format(start_time,'%Y-%m-%d') in
(
select date_format(release_time,'%Y-%m-%d') as rt
from examination_info
where tag='SQL'
)
and level>5
)
and tag='SQL'
group by er.exam_id
order by uv desc,avg_score asc

全部评论

相关推荐

08-05 18:14
门头沟学院 Java
小花的沉默:是学历厂没错啊,学历太高了不要
投递小鹏汽车等公司10个岗位
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务