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

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

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

#1.找出昵称以"牛客"+纯数字+"号"或者纯数字组成的用户
select 
    a.uid,
    a.exam_id,
    round(avg(score),0) as avg_score
from
    exam_record as a
join (
    select
        exam_id
    from
        examination_info
    where
        tag rlike '^[cC]'
)as b
on a.exam_id = b.exam_id
where a.uid in
(
    select 
        uid 
    from
        user_info
    where
        nick_name rlike '^牛客+[0-9]+号$'
        or nick_name rlike '^[0-9]+$'
)and score is not null
group by uid,exam_id
order by uid,avg_score

全部评论

相关推荐

被普调的六边形战士很高大:项目经历貌似和专业或者求职方向没大关系?
点赞 评论 收藏
分享
purcoter:虚拟货币预测正确率百分之99,还要找工作干嘛,不早就财富自由了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务