What is {position of head of government} of {place of work} of {Pius VII} ?
Which position did Pius VII hold?
What position does Pius VII hold?
SELECT ?d WHERE { ?y property:office_held_by_head_of_government ?d . resource:Pius_VII property:work_location ?y }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q124754> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P937>. ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?X . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?X. ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1313> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?answer . }
SELECT ?answer WHERE { wd:Q124754 wdt:P937 ?X . ?X wdt:P1313 ?answer}
mayor of Rome