题解 | 播放量峰值top3高的视频

播放量峰值top3高的视频

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

select cid,round(max(peak_uv),3) as max_peak_uv
from(
	select cid,sum(tag)over(partition by cid order by time) as peak_uv
	from(
		select cid,start_time as time,1 as tag
		from play_record_tb
		union all
		select cid,end_time as time,-1 as tag
		from play_record_tb)a)b
group by cid
order by max_peak_uv desc
limit 3


全部评论
我朝,甜菜
点赞 回复 分享
发布于 03-21 18:43 天津

相关推荐

仁者伍敌:牛子这些人还会点一个自动回复,boss都不带回复的
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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