PREFIX foaf: SELECT ?name ?x ?p ?y WHERE { GRAPH ?src { ?x ?p ?y } ?src foaf:name ?name }