Question: What is the work David Foster (the one that was nominated for Academy Award for Best Original Song) was nominated for Grammy Award for Song of the Year for?
Choices:
When You Wish Upon a Star
Transformers: Revenge of the Fallen
Tabasco Road
U-571
After the Love Has Gone
Dragonslayer
Homeland
The Book Thief
Project Runway
The Florida Project
Answer: After the Love Has Gone
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "David Foster" . ?e_1 <nominated_for> ?e_3 . ?e_3 <pred:name> "Academy Award for Best Original Song" . ?e_2 <pred:name> "Grammy Award for Song of the Year" . ?e_1 <nominated_for> ?e_2 . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <nominated_for> ; <pred:fact_t> ?e_2 ] <for_work> ?qpv .  }
Program:
function: Find
inputs: Academy Award for Best Original Song
function: Relate
dependencies: 0
inputs: nominated for
backward
function: Find
inputs: David Foster
function: And
dependencies: 1
2
function: Find
inputs: Grammy Award for Song of the Year
function: QueryRelationQualifier
dependencies: 3
4
inputs: nominated for
for work