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

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

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

全部评论

相关推荐

frutiger:逆天,我家就安阳的,这hr咋能说3k的,你送外卖不比这工资高得多?还说大厂来的6k,打发叫花子的呢?这hr是怎么做到说昧良心的话的
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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