with t1 as ( select a.video_id vid, mth, fans_flag, author from ( select video_id, DATE_FORMAT (end_time, "%Y-%m") mth, case when if_follow = 1 then 1 when if_follow = 0 then 0 when if_follow = 2 then -1 end as fans_flag from tb_user_video_log ) as a left join ( select video_id, author fro...