What is {spouse} of {Sándor Petőfi} that is {start time} is {1847-9-8} ?
Who was Sandor Petrofi married to in 1847?
Who was the spouse of Sándor Petőfi in 1847?
SELECT ?r WHERE { ?q property:spouse ?r . FILTER ( CONTAINS ( YEAR ( ?m ) , '1847' ) ) . ?q property:start_time ?m . resource:Sándor_Petőfi property:spouse ?q }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q81219> .
?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/P580> <1847-9-8>
} 

SELECT ?obj WHERE { wd:Q81219 p:P26 ?s . ?s ps:P26 ?obj . ?s pq:P580 ?x filter(contains(YEAR(?x),'1847')) }