题解 | #筛选昵称规则和试卷规则的作答记录#
筛选昵称规则和试卷规则的作答记录
https://www.nowcoder.com/practice/1c5075503ccf4de1882976b2fff2c072
with uid_f_use as ( select uid from user_info where nick_name rlike '^牛客[0-9]+号$' or nick_name regexp '^[0-9]+$' ), exam_f_use as ( select exam_id from examination_info where tag regexp '^[Cc]' ) select uid, exam_id, round(avg(score),0) as avg_score from exam_record where submit_time is not null and exam_id in (select exam_id from exam_f_use) and uid in (select uid from uid_f_use) group by uid, exam_id order by uid, avg_scorerlike 和 expexp 的使用,不理解为什么要用 + ,还要再学习一下
