I have been working on ranking inside my script and I am having issue with certain rows duplicating. There is no rhyme or reason for it that I can see in my raw data. There are multiple functions I have used and end up with the same results. We are ranking on the MRN level. Am I missing a where clause in this?