The link for the query builder is https://app.whi.org/qb
When you pick more than one item in a "select many list" style criteria like the ancillary study criteria, it defaults to combining those selections using OR. e.g. Participant is in Study A or B. To ask the question "How many participants are in Study A and are also in Study B?", simply add the ancillary study criteria twice, once for study A and once for study B.
See How to merge two queries together or How to combine criteria using "OR"s rather than "AND"s