SELECT tag, sum( if_retweet ), avg( if_retweet ) FROM ( SELECT a.video_id, b.tag, a.start_time, a.end_time, if_retweet FROM tb_user_video_log a JOIN tb_video_info b ON a.video_id = b.video_id ) C JOIN ( SELECT video_id, max( end_time ) max_time, min( start_time ) min_time FROM tb_user_video...