Question: What rock band was nominated for the award that was received by John Legend in 1977?
Choices:
Kings of Leon
Linkin Park
Foreigner
Queen
Gong
Santana
Marilyn Manson
Fleetwood Mac
New Order
Journey
Program:
function: Find
inputs: John Legend
function: Relate
dependencies: 0
inputs: award received
forward
function: FilterConcept
dependencies: 1
inputs: award
function: Relate
dependencies: 2
inputs: nominated for
backward
function: QFilterYear
dependencies: 3
inputs: point in time
1977
=
function: FilterConcept
dependencies: 4
inputs: rock band
function: What
dependencies: 5
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "rock band" . ?e <nominated_for> ?e_1 . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "award" . ?e_2 <award_received> ?e_1 . ?e_2 <pred:name> "John Legend" .  [ <pred:fact_h> ?e ; <pred:fact_r> <nominated_for> ; <pred:fact_t> ?e_1 ] <point_in_time> ?qpv . ?qpv <pred:year> 1977 .  }
Answer: Foreigner