select author,month,fans_growth_rate,sum(fans)over(partition by author order by month) as total_fans
from 
(select author,substr(start_time,1,7) as month,round((sum(if_follow=1)-sum(if_follow=2))/count(1),3) as fans_growth_rate,sum(if_follow=1)-sum(if_follow=2) as fans
from tb_user_video_log t join tb_video_info t1 using(video_id)
group by author,month) t
where fans_growth_rate <>0
order by author,total_fans