Question: Which public office is the head of government of Mesa (whose country is the United States of America) and also the head of government of Hamburg?
Choices:
attorney general
Eve
Governor of New Jersey
mayor
Governor of Massachusetts
Governor of New York
Governor of Texas
Governor of Kentucky
Adam Goldberg
Utah Jazz
Program:
function: Find
inputs: United States of America
function: Relate
dependencies: 0
inputs: country
backward
function: Find
inputs: Mesa
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: office held by head of government
forward
function: FilterConcept
dependencies: 4
inputs: public office
function: Find
inputs: Hamburg
function: Relate
dependencies: 6
inputs: office held by head of government
forward
function: FilterConcept
dependencies: 7
inputs: public office
function: And
dependencies: 5
8
function: What
dependencies: 9
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "public office" . ?e_1 <office_held_by_head_of_government> ?e . ?e_1 <pred:name> "Mesa" . ?e_1 <country> ?e_2 . ?e_2 <pred:name> "United States of America" .  ?e_3 <office_held_by_head_of_government> ?e . ?e_3 <pred:name> "Hamburg" .  }
Answer: mayor