select author, date_format(end_time,'%Y-%m') month, round(sum(case when if_follow = 2 then -1 else if_follow end )/count(if_follow),3) fans_growth_rate, sum(sum(case when if_follow = 2 then -1 else if_follow end)) over(partition by author order by date_format(end_time,'%Y-%m') rows between unbounded preceding and current row) total_fans from tb_video_info s1 left join tb_user_video_log s2 using(video_id) where year(end_time) = 2021 and s2.id is not null group by 1,2 order by 1,2 哥们我这个和你的有啥区别,凭啥你能过
点赞

相关推荐

12-25 16:26
已编辑
河北科技学院 Java
勇敢的牛油不服输:2800-300那不等于2500一个月吗兄弟们
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务