How to skip the duplicate rows by selecting only its first occurance?