Question: What is the final date that James Madison (whose date of birth is 1750-03-05) holds the office of President of the United States?
Choices: 2014-12-31
2006-05-18
1878-07-12
1998-05-18
1972-12-01
1939-03-13
1977
1972
1817-03-04
1985-12-29
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "James Madison" . ?e_1 <date_of_birth> ?pv . ?pv <pred:date> "1750-03-05"^^xsd:date . ?e_2 <pred:name> "President of the United States" . ?e_1 <position_held> ?e_2 . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <position_held> ; <pred:fact_t> ?e_2 ] <end_time> ?qpv .  }
Program:
function: Find
inputs: James Madison
function: FilterDate
dependencies: 0
inputs: date of birth
1750-03-05
=
function: Find
inputs: President of the United States
function: QueryRelationQualifier
dependencies: 1
2
inputs: position held
end time
Answer: 1817-03-04