sql viaJunctor changed so no duplicate rows are returned