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

每个创作者每月的涨粉率及截止当前的总粉丝量

http://www.nowcoder.com/practice/d337c95650f640cca29c85201aecff84

select author, date_format(t.start_time, '%Y-%m') month, round( sum(if(t.if_follow = 2, -1, t.if_follow)) / count(t.video_id), 3 ) fans_growth_rate, sum(sum(if(t.if_follow = 2, -1, t.if_follow))) over( partition by tt.author order by date_format(t.start_time, '%Y-%m') ) as total_fans from tb_user_video_log t, tb_video_info tt where t.video_id = tt.video_id and year(start_time)=2021 group by author, month order by author, total_fans

全部评论

相关推荐

鼗:四级有点难绷,感觉能拿国家励志奖学金,学习能力应该蛮强的,四级确实不重要,但是拿这个卡你可是很恶心啊
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务