select author, `month`, round((count(if(if_follow=1,1,null))- count(if(if_follow=2,1,null))) / count(look_time),3) fans_growth_rate, sum(sum(case when if_follow=1 then 1 when if_follow=2 then -1 else 0 end)) over(partition by author order by month) total_fans from ( ...