Question: What is the ending date that the United States of America's president is James Buchanan (whose birth name is James Buchanan, Jr.)?
Choices:
1893-02-27
1897-01-01
2004-05-06
1861-03-04
1291
1933
1976-08-01
1934
1997-07-12
1939
Answer: 1861-03-04
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "United States of America" . ?e_2 <pred:name> "James Buchanan" . ?e_2 <birth_name> ?pv . ?pv <pred:value> "James Buchanan, Jr." . ?e_1 <head_of_government> ?e_2 . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <head_of_government> ; <pred:fact_t> ?e_2 ] <end_time> ?qpv .  }
Program:
function: Find
inputs: United States of America
function: Find
inputs: James Buchanan
function: FilterStr
dependencies: 1
inputs: birth name
James Buchanan, Jr.
function: QueryRelationQualifier
dependencies: 0
2
inputs: head of government
end time