mani_1234 Starting Member
India 24 Posts
khtan In (Som, Ni, Yak)
Singapore 16766 Posts
select * from ( select *, rn = row_number() over ( partition by case when a < b then a + b else b + a end order by sq_no desc) from input ) d where d.rn = 1 order by sq_no desc
visakh16 Very Important crosS Applying yaK Herder
India 47975 Posts
quote:Originally posted by mani_1234thnx bt it can b more optimized if possble in terms of io and time