What is {spouse} of {Samuel Hahnemann} that is {end time} is {1830-0-0} ?
Who was the last spouse for Samuel Hahnemann in the year 1830?
SELECT ?obj WHERE { wd:Q157056 p:P26 ?s . ?s ps:P26 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1830')) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q157056> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P26> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <1830-0-0>
} 

Samuel Hahnmann was married to who in 1830