SELECT DISTINCT ?uri WHERE {?uri <http://dbpedia.org/property/spouse> <http://dbpedia.org/resource/Dolley_Madison> . ?uri <http://dbpedia.org/property/branch> <http://dbpedia.org/resource/Militia> . ?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/OfficeHolder>}
Name the office holder whose spouse is Dolley Madison and belongs to Militia branch ?
SELECT DISTINCT ?w WHERE { ?w rdf:type ontology:Office_Holder . ?w property:branch resource:Militia . ?w property:spouse resource:Dolley_Madison }
James Madison
The office holder whose spouse is Dolley Madison and branch is Militia is [James Madison].
An office holder whose partner is Dolley Madison and an division ilitia is [James Madison].
[James Madison] is the office holder whose wed is her and branch is Militia.
[James Madison] is an office holder whose wife she is and whose branch is the police.
[James Madison] is the office holder whose wed is the person and branch is Militia.
[James Madison] is an office holder with the person as its partner and the branch as Militia.