无上清颜 level
获赞
1360
粉丝
2
关注
14
看过 TA
105
门头沟学院
2023
数据分析师
IP属地:山东
摸鱼界扛把子
私信
关注
0 点赞 评论 收藏
分享
0 点赞 评论 收藏
分享
-- 第一步:筛选出SQL试卷未完成率较高的50%的用户 with t as ( select uid from (select *,row_number()over(order by incomplete_rate desc) as rn,count(1)over() as num from (select uid,count(1)-count(submit_time) as incomplete_cnt,count(1) as total_cnt,(count(1)-count(submit_time))/count(1) as incomplete_rate from exam_reco...
无上清颜:percent_rank: with t as ( select uid from (select *,percent_rank()over(order by incomplete_rate desc) as rate from (select uid,count(1)-count(submit_time) as incomplete_cnt,count(1) as total_cnt,(count(1)-count(submit_time))/count(1) as incomplete_rate from exam_record where exam_id in (select exam_id from examination_info where tag = 'SQL') group by uid) t1) t2 where rate<=0.5 and uid in (select uid from user_info where level in ('6','7') ) ) select uid,dtime as start_month,count(1) as total_cnt,count(score) as complete_cnt from (select uid,DATE_FORMAT(start_time,"%Y%m") as dtime,DENSE_RANK()over(partition by uid order by DATE_FORMAT(start_time,"%y%m") desc) as rn,score from exam_record where uid in (select uid from t)) t1 where rn<=3 group by uid,start_month order by uid,start_month
0 点赞 评论 收藏
分享

创作者周榜

更多
关注他的用户也关注了:
牛客网
牛客网在线编程
牛客网题解
牛客企业服务