Question: Who was the president under whom, a governor participated in Shay's rebellion?
SPARQL query: SELECT DISTINCT ?uri WHERE { ?x <http://dbpedia.org/ontology/battle> <http://dbpedia.org/resource/Shays'_Rebellion> . ?x <http://dbpedia.org/property/president> ?uri  . ?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Governor>}
Answer: The president of the governor who was participant in battle of Shays' Rebellion is [James Madison].