Leave and join working. otherGroups SQL function needs to be fixed.