query for subtree over id