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>}
Who was the president under whom, a governor participated in Shay's rebellion?
SELECT DISTINCT ?c WHERE { ?t property:battle resource:Shays'_Rebellion . ?t rdf:type ontology:Governor . ?t property:president ?c }
James Madison
The president of the governor who was participant in battle of Shays' Rebellion is [James Madison].
The president of the governor participating in the Battle of Shays is James Madison.