What is {spouse} of {James Dunn} that is {start time} is {1938-1-1} ?
In 1938 who was it James Dunn married?
Who did James Dunn marry in the year 1938?
SELECT ?w WHERE { resource:James_Dunn property:spouse ?y . ?y property:start_time ?e . FILTER ( CONTAINS ( YEAR ( ?e ) , '1938' ) ) . ?y property:spouse ?w }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q471281> .
?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> <1938-1-1>
} 

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