Question: What is the subject of Barbados having diplomatic relations with Australia (which also has diplomatic relations with Dominican Republic)?
Choices: Karl-Marx-Stadt
Australia–Barbados relations
Lebanon–Saudi Arabia relations
Jordan–Syria border
Mauritius–South Africa relations
Lebanon–Uruguay relations
Namibia–Taiwan relations
Liberia–United States relations
Uzbekistan–Ukraine relations
Cyprus–Denmark relations
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "Barbados" . ?e_2 <pred:name> "Australia" . ?e_3 <diplomatic_relation> ?e_2 . ?e_3 <pred:name> "Dominican Republic" . ?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: Barbados
function: Find
inputs: Dominican Republic
function: Relate
dependencies: 1
inputs: diplomatic relation
forward
function: Find
inputs: Australia
function: And
dependencies: 2
3
function: QueryRelationQualifier
dependencies: 0
4
inputs: diplomatic relation
statement is subject of
Answer: Australia–Barbados relations