The “where” clause in compare/repair does not exclude the subquery so one can use a subquery in the “where” clause. However, the subqueries can have subtleties about them which a user needs to be beware of. The subquery can retrieve rows that the user did not intend to fetch and this can result in the target table to be improperly sync’d. It will not be a compare bug or a bug with the subquery, but rather, a user error. So if one intends to use a subquery in compare/repair, the result of the subquery should be tested first before deploying it for compare/repair.