what is the {winner} for {The Best Years of Our Lives} has {award received} as {Academy Award for Best Writing, Adapted Screenplay} ?
Who won the Oscar for Best Writing?
Who won the Academy Award for Best Writing, Adapted Screenplay for The Best Years of Our Lives?
SELECT ?x WHERE { ?w property:award_received resource:Academy_Award_for_Best_Writing,_Adapted_Screenplay . resource:The_Best_Years_of_Our_Lives property:award_received ?w . ?w property:winner ?x }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q645094> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P166> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q107258> .
?statement <http://www.wikidata.org/entity/P1346> ?value. 
} 

SELECT ?value WHERE { wd:Q645094 p:P166 ?s . ?s ps:P166 wd:Q107258 . ?s pq:P1346 ?value}