time5相同,比较time4,time4较小的time5判空
想要的
select time3,time4
,case when time4=maxtime4 then time5 end as time5
from (
select *,max(time4) over (partition by time5) maxtime4 from 表
) a
select time3,tim4, if(time4 < time5, '',time5) time5
是这种吗?