Question: How many islands have a diplomatic relation with United States of America or are different from Guernsey (whose ISO 3166-1 numeric code is 831)?
Choices:
0
1
2
3
4
5
6
7
8
9
Program:
function: Find
inputs: United States of America
function: Relate
dependencies: 0
inputs: diplomatic relation
backward
function: FilterConcept
dependencies: 1
inputs: island
function: Find
inputs: Guernsey
function: FilterStr
dependencies: 3
inputs: ISO 3166-1 numeric code
831
function: Relate
dependencies: 4
inputs: different from
backward
function: FilterConcept
dependencies: 5
inputs: island
function: Or
dependencies: 2
6
function: Count
dependencies: 7
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "island" .  { ?e <diplomatic_relation> ?e_1 . ?e_1 <pred:name> "United States of America" .  } UNION { ?e <different_from> ?e_1 . ?e_1 <pred:name> "Guernsey" . ?e_1 <ISO_3166-1_numeric_code> ?pv . ?pv <pred:value> "831" .  } }
Answer: 2