Question: What is the subject of the statement that Egypt (the one that has a diplomatic relation with Pakistan) has a diplomatic relation with Malaysia?
Choices: China–Nepal border
Austria–Bangladesh relations
Kenya–North Korea relations
The Gambia–Taiwan relations
Egypt–Malaysia relations
Hinduism in Malta
Moldova–Russia relations
Mozambique–Zambia border
Australia–South Africa relations
Hungary–Slovenia border
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "Egypt" . ?e_3 <diplomatic_relation> ?e_1 . ?e_3 <pred:name> "Pakistan" . ?e_2 <pred:name> "Malaysia" . ?e_1 <diplomatic_relation> ?e_2 . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <diplomatic_relation> ; <pred:fact_t> ?e_2 ] <statement_is_subject_of> ?qpv .  }
Program:
function: Find
inputs: Pakistan
function: Relate
dependencies: 0
inputs: diplomatic relation
forward
function: Find
inputs: Egypt
function: And
dependencies: 1
2
function: Find
inputs: Malaysia
function: QueryRelationQualifier
dependencies: 3
4
inputs: diplomatic relation
statement is subject of
Answer: Egypt–Malaysia relations