PREFIX : PREFIX foaf: DELETE { GRAPH { ?s ?p ?o } } WHERE { GRAPH { :a foaf:knows ?s . ?s ?p ?o } }