Question: Does Israel (the one that has a diplomatic relation with Norway) or Spain have greater age of candidacy ?
Choices:
Cambodia
Spain
Russian Soviet Federative Socialist Republic
Israel
Benin
Samoa
Weimar Republic
South Sudan
Socialist Federal Republic of Yugoslavia
Kiribati
Program:
function: Find
inputs: Norway
function: Relate
dependencies: 0
inputs: diplomatic relation
backward
function: Find
inputs: Israel
function: And
dependencies: 1
2
function: Find
inputs: Spain
function: SelectBetween
dependencies: 3
4
inputs: age of candidacy
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Israel" . ?e <diplomatic_relation> ?e_1 . ?e_1 <pred:name> "Norway" .   } UNION { ?e <pred:name> "Spain" .  } ?e <age_of_candidacy> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Israel