egoquery and multiplequery unified