with t1 as ( select tag,substr(end_time,1,10) dt, sum(if_like) sum_like, sum(if_retweet) sum_re from tb_user_video_log t1 join tb_video_info tvi on t1.video_id = tvi.video_id group by tag,dt ), t2 as ( select *,sum(sum_like) over(partition by tag order by dt...