Add a group_by statement to avoid duplicates in results