• Hi Mark,

    I figured it out myself.

    Instead of using row_number() if I use rank() or dense_rank() it would take all the combinations keeping the value of RN same for the highest number of match.

    Again thanks a lot !!

    I was stuck on it for 4 days and you came up as a life savior.

    Regards,

    Vivek