Remove rawSQL formatting for join table select