0 点赞 评论 收藏
分享
0 点赞 评论 收藏
分享
0 点赞 评论 收藏
分享
2021-11-25 10:51
门头沟学院 数据分析师 无上清颜: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 点赞 评论 收藏
分享
创作者周榜
更多
关注他的用户也关注了: