题解 | #平均播放进度大于60%的视频类别#

平均播放进度大于60%的视频类别

https://www.nowcoder.com/practice/c60242566ad94bc29959de0cdc6d95ef

select
    tag,
    concat (
        round(
            avg(
                case
                   when timestampdiff (second, start_time,    end_time) < duration then    timestampdiff (second, start_time, end_time) / duration
                    else 1
                end
            ) * 100,
            2
        ),
        '%'
    ) avg_play_progress
from
    tb_user_video_log t,
    tb_video_info tb
where
    t.video_id = tb.video_id
group by
    tb.tag
having
    substring_index(avg_play_progress,'%',1)> 60
order by
    avg_play_progress desc

全部评论

相关推荐

12-15 14:16
门头沟学院 Java
回家当保安:发offer的时候会背调学信网,最好不要这样。 “27届 ”和“28届以下 ”公司招聘的预期是不一样的。
实习简历求拷打
点赞 评论 收藏
分享
10-29 15:51
嘉应学院 Java
后端转测开第一人:你把简历的学历改成北京交通大学 去海投1000份发现基本还是没面试
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务