Improved Querry to Eliminate Duplicates after Join