select distinct transactions when fetching via join