What is {spouse} of {John Gilbert} that is {end time} is {1931-1-1} ?
Who was the wife of John Gilbert up until the beginning of 1931?
Who was the spouse of John Gilbert up until the beginning of 1931?
SELECT ?v WHERE { ?w property:spouse ?v . ?w property:end_time ?g . FILTER ( CONTAINS ( YEAR ( ?g ) , '1931' ) ) . resource:John_Gilbert property:spouse ?w }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q503956> .
?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> <1931-1-1>
} 

SELECT ?obj WHERE { wd:Q503956 p:P26 ?s . ?s ps:P26 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1931')) }