题解 | #各个视频的平均完播率#

试卷完成数同比2020年的增长率及排名变化

http://www.nowcoder.com/practice/13415dff75784a57bedb6d195262be7b

#各类,2021年上半年做完次数,2020年上半年做完次数,增长率,做完次数排名 with t1 as (select a.*,b.tag from (select * from exam_record)a left join (select exam_id,tag from examination_info)b on a.exam_id=b.exam_id)

select t3.tag ,num1,num2,concat(round((num2-num1)/num1*100,1),'%') rate ,cast(rn1 as signed),cast(rn2 as signed) 21rn ,cast(rn2 as signed)-cast(rn1 as signed) from (select tag,num1,rank() over(order by num1 desc) rn1 from (select tag,count(score) num1 from t1 where date_format(start_time,'%Y-%m') between '2020-01' and '2020-06' group by tag )t4 )t5 left join (select tag,num2,rank() over(order by num2 desc) rn2 from (select tag,count(score) num2 from t1 where date_format(start_time,'%Y-%m') between '2021-01' and '2021-06' group by tag )t2) t3 on t5.tag=t3.tag where num1 !=0 and num2!=0 order by rate desc,21rn desc

全部评论

相关推荐

07-17 11:27
门头沟学院 Java
点赞 评论 收藏
分享
07-09 20:50
门头沟学院 Java
码农索隆:1.教育背景和荣誉证书合二为一。 2.获奖项目理一遍,你做了什么,对你求职的岗位有什么帮助,没有就删掉。 3.技能特长和教育背景交换位置。 4.技能特长写的太差,上网上找简历参考。都不用问你别的,一个redis就能把你问住,写写你具体会redis哪些方面的知识。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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