select tag,dt,num1 as sum_like_cnt_7d, num2 as max_retweet_cnt_7d from( select tag , date(start_time) dt, sum(if_like),sum(if_retweet), sum(sum(if_like)) over(partition by tag order by date(start_time) rows 6 preceding) as num1, max(sum(if_retweet)) over(partition by tag order...