Select * from( Select tag,dt, sum(like_count) over (PARTITION BY tag ORDER BY dt asc rows 6 preceding) like_cnt, max(retweet_cnt) over (PARTITION BY tag Order by dt asc rows 6 preceding) retweet_cnt from ( Select tag,date(start_time) as dt, sum(if_like) like_count, sum(if...