with a as (select v.tag,substring(u.start_time,1,10) as time,sum(u.if_like) as like_1,sum(u.if_retweet)as retweet from tb_user_video_log as u left join tb_video_info as v on u.video_id=v.video_id group by v.tag,time) select a1.tag,a1.time,sum(a2.like_1),max(a2.retweet) from a as a1 left join a as a2...