SELECT ?b ?y WITH WHERE { ( ?b rdf:type rdf:Bag ) ( ?b ?x ?y ) FILTER! ( ( ?x = rdf:type ) && ( ?y = rdf:Bag ) )