# authors who have a publication and optionally a project

PREFIX ns1: <http://namespace1.org/>
PREFIX ns3: <http://namespace3.org/>
PREFIX ns4: <http://namespace4.org/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl:  <http://www.w3.org/2002/07/owl#>

SELECT ?author ?publication ?name ?project WHERE {
 ?author rdf:type ns4:Author .
 ?publication ns4:hasAuthor ?author .
 OPTIONAL {
 	?author owl:sameAs ?person .
 	?person foaf:name ?name .
 } .
 OPTIONAL {
 	?project ns3:responsible ?person .
 }
}