$ 0 0 It's hard to guess without any details about the rules you want to implement. select * from tab qualify rank() over (partition by inr, rd order by dt desc, ct1 desc, ct2 desc) = 1 Dieter
It's hard to guess without any details about the rules you want to implement.
Dieter