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

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

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

select
    exam_id,
    count(distinct uid) as uv,
    round(avg(score), 1) as avg_score
from
    exam_record er
    left join examination_info ei using (exam_id)
    left JOIN user_info ui using (uid)
where
    tag = 'SQL'
    and score is not null
    and uid in (
        select
            uid
        from
            user_info
        where
            level > 5
    )
group by
    exam_id
order by uv desc,avg_score asc
    ;

全部评论

相关推荐

粉红恶魔派星星:炸了,偶遇kpi面。面试官一直在忙自己的事情。1.手写责任链 2.手写快排 3.linux定时任务的命令 4.springboot的定时任务 5.问了一条实习
今天你投了哪些公司?
点赞 评论 收藏
分享
03-11 16:05
运城学院 Java
程序员小白条:简历内容太多了,而且一段实习都没的情况下,写这么多,没啥说服力,反而让人觉得假
听劝,我这个简历该怎么改...
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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