题解 | #平均播放进度大于60%的视频类别#
每类视频近一个月的转发量/率
http://www.nowcoder.com/practice/a78cf92c11e0421abf93762d25c3bfad
SELECT
tag,
SUM(if_retweet) AS retweet_cut,
ROUND(SUM(if_retweet)/COUNT(video_id),3) AS retweet_rate
FROM tb_user_video_log log
JOIN tb_video_info info USING(video_id)
WHERE DATEDIFF((SELECT MAX(end_time) FROM tb_user_video_log),start_time)<=29
GROUP BY tag
ORDER BY retweet_rate DESC