SELECT DISTINCT ?uri WHERE { ?x <http://dbpedia.org/property/branch> <http://dbpedia.org/resource/Continental_Army> . ?x <http://dbpedia.org/property/president> ?uri . }
Under which presidents have politicians from the Continental army served?
SELECT DISTINCT ?g WHERE { ?s property:president ?g . . ?s property:branch resource:Continental_Army }
Thomas Jefferson, George Washington, John Adams, James Madison, James Monroe, John Quincy Adams
The presidents of the people whose branch is Continental Army are [Thomas Jefferson, George Washington, John Adams, James Madison, James Monroe, John Quincy Adams].
The people whose branch is the Continental Army [Thomas Jefferson, George Washington, John Adams, James Madison, James Monroe, John Quincy Adams].