What is {isn't} of {bun}, that has {is in the ward of} is {Hautes-Pyrénées} ?
What wards are within the Hautes-Pyrenees district?
What wards are in the Hautes-Pyrenees district?
SELECT ?d WHERE { ?d property:located_in_the_administrative_territorial_entity resource:Hautes-Pyrénées . resource:bun property:different_from ?d }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q13377687> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1889>. ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?answer . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?answer. ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P131> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q12700> . }
SELECT ?answer WHERE { wd:Q13377687 wdt:P1889 ?answer . ?answer wdt:P131 wd:Q12700}