题解 | 播放量峰值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