select tag, dt, sum_like_cnt_7d, max_retweet_cnt_7d from (select tvi.tag, date_format(start_time, "%Y-%m-%d") as dt, sum(sum(tuvl.if_like)) over(partition by tvi.tag order by date_format(start_time, "%Y-%m-%d") asc rows 6 preceding) as sum_like_cnt_7d, max(sum(tuvl.if_retweet)) over(partition b...