PREFIX rdf: SELECT * WHERE { ?x (!(rdf:type|^rdf:type)) ?y . }