PREFIX xsd: PREFIX rdf: PREFIX foaf: PREFIX dc: ASK { ?erdoes rdf:type foaf:Person . ?erdoes foaf:name "Paul Erdoes"^^xsd:string . { ?document dc:creator ?erdoes . ?document dc:creator ?author . ?document2 dc:creator ?author . ?document2 dc:creator ?author2 . ?author2 foaf:name ?name FILTER (?author!=?erdoes && ?document2!=?document && ?author2!=?erdoes && ?author2!=?author) } UNION { ?document dc:creator ?erdoes . ?document dc:creator ?author . ?author foaf:name ?name FILTER (?author!=?erdoes) } }