There are two ways to set up inbox queries:
1) Inbox queries can be set on the parent records by using the 'Options' tab in ArcGIS Survey123 Connect and entering a query expression (WHERE clause). This allows users to query based on an attribute in the parent feature.
2) Inbox queries can be set on the related records by using the 'query=' parameter in the 'bind::esri:parameters' column of the begin repeat question in the XLSForm.
The syntax for the 'bind::esri:parameters' column of the begin repeat question is correct. Since this query is being run on a field ('example2') in the related table, all parent records are returned. Releated records are loaded via the inbox if they have a value of 'yes' for the 'example2' question. If no related records have a value of 'yes', the parent record is still loaded from the inbox containing a 'blank' repeat. Add the 'minimal' appearance to the begin repeat question if this blank repeat record is undesired (the user can still add one by tapping the '+' button).