题解 | #筛选昵称规则和试卷规则的作答记录#

筛选昵称规则和试卷规则的作答记录

https://www.nowcoder.com/practice/1c5075503ccf4de1882976b2fff2c072

这题考察的是正则表达式。

正则表达式这个知识点还没有掌握。

select uid,
exam_id,
round(avg(score), 0) as avg_score from exam_record
where uid in (
    select uid
    from user_info
    where nick_name rlike '^牛客[0-9]+号$' or nick_name rlike '^[0-9]+$' )
    and exam_id in (
        select exam_id
        from examination_info
        where tag rlike '^[cC]'
    )
    and score is not null
group by uid, exam_id
order by uid, avg_score

全部评论

相关推荐

10-29 19:42
门头沟学院 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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