make the query distinct after a join with alias or soundex