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

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

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

select 
b.exam_id,
count(distinct b.uid) uv,
format(sum(b.score) /count( b.uid),1)  avg_score
from  
examination_info a,
exam_record b,
user_info c
where a.exam_id=b.exam_id
and a.tag='SQL'
and b.submit_time is not null
and date_format(b.submit_time,'%y%m%d')=date_format(a.release_time,'%y%m%d')
and b.uid=c.uid
and c.level>5
group by b.exam_id
order by uv desc,avg_score asc

全部评论

相关推荐

06-28 22:48
已编辑
广东金融学院 Java
小浪_Coding:学院本+这俩项目不是buff叠满了嘛
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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