Apply the phone and email is_primary condition to the JOIN clause and not the WHERE clause