What is {shares border with} of {Basque Autonomous Community} that is {applies to part} is {Pyrénées-Atlantiques} ?
ABout the Basque communities, which one sharesa border with part of Pyrenees-Atlantiques?
What Basque Autonomous Community shares a border with part of Pyrenees-Atlantiques?
SELECT ?r WHERE { ?w property:shares_border_with ?r . ?w property:applies_to_part resource:Pyrénées-Atlantiques . resource:Basque_Autonomous_Community property:shares_border_with ?w }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q3995> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P47> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P518> <http://wikidata.dbpedia.org/resource/Q12703>
} 

SELECT ?obj WHERE { wd:Q3995 p:P47 ?s . ?s ps:P47 ?obj . ?s pq:P518 wd:Q12703 }