How To Find Duplicates In Sql Using Rank