题解 | #每类视频近一个月的转发量/率#
每类视频近一个月的转发量/率
https://www.nowcoder.com/practice/a78cf92c11e0421abf93762d25c3bfad
select b.tag as tag,sum(a.if_retweet) as retweet_cut,round(sum(a.if_retweet)/count(a.video_id),3) as retweet_rate from tb_video_info b right join tb_user_video_log a using(video_id) ##限定时间为此题难点,话说题目表述很让人迷惑 where timestampdiff(day,start_time,(select max(start_time) from tb_user_video_log))<30 group by b.tag order by retweet_rate desc

