题解 | #每类视频近一个月的转发量/率#
每类视频近一个月的转发量/率
https://www.nowcoder.com/practice/a78cf92c11e0421abf93762d25c3bfad
SELECT tag, sum(if_retweet) as retweet_cut, FORMAT(sum(if_retweet)/count(*),3) AS retweet_rate FROM tb_user_video_log a join tb_video_info b ON a.video_id=b.video_id WHERE datediff('2021-10-02 00:00:00',start_time)<=30 GROUP BY tag ORDER BY retweet_rate desc