SELECT DISTINCT ?uri WHERE {?uri <http://dbpedia.org/property/spouse> <http://dbpedia.org/resource/Dolley_Madison> . ?uri <http://dbpedia.org/property/restingplace> <http://dbpedia.org/resource/Montpelier_(Orange,_Virginia)> . ?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/OfficeHolder>}
Name the office holder who was married to Dolley Madison and has resting palce as Montpelier ?
SELECT DISTINCT ?g WHERE { ?g property:restingplace resource:Montpelier_(_Orange,_Virginia) . ?g rdf:type ontology:Office_Holder . ?g property:spouse resource:Dolley_Madison }
James Madison
[James Madison] is the officeholder whose spouse is Dolley Madison and was buried in Montpelier.
[James Madison] is an office holder whose wife is called Dee Madison and buried in Montpellier.
The office holder whose wife is her and restingplace is Montpelier (Orange, Virginia) is [James Madison].
The office holder whose wife she is and whose place of rest is Montpellier (Orange, Virginia) is [James Madison].