select v.author, date_format(u.start_time, '%Y-%m') as month, round(sum(if(if_follow=1, 1, if(if_follow = 2, -1, 0))) / count(u.uid), 3) as fans_growth_rate, sum(sum(if(if_follow=1, 1, if(if_follow = 2, -1, 0)))) over (partition by v.author order by date_format(u.start_time, '%Y-%m')) as total_fans ...