What is {prime minister} of {comes from} of {Barefoot Gen} ?
what is the name of the prime minister who came from barfoot gen?
Who is the prime minister that came from Barfoot Gen?
SELECT ?o WHERE { resource:Barefoot_Gen property:country_of_origin ?z . ?z property:head_of_government ?o }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q4347> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P495>. ?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/P6> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?answer . }
SELECT ?answer WHERE { wd:Q4347 wdt:P495 ?X . ?X wdt:P6 ?answer}
Yoshihide Suga