Question: What number of German states have a shared border with North Rhine-Westphalia and have a military foe in the Kingdom of Great Britain?
Choices:
4
5
6
7
8
9
10
11
12
13
Answer: 4
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "state of Germany" .  { ?e <military_conflicts> ?e_1 . ?e_1 <pred:name> "Kingdom of Great Britain" .  } UNION { ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "North Rhine-Westphalia" .  } }
Program:
function: Find
inputs: Kingdom of Great Britain
function: Relate
dependencies: 0
inputs: military conflicts
backward
function: FilterConcept
dependencies: 1
inputs: state of Germany
function: Find
inputs: North Rhine-Westphalia
function: Relate
dependencies: 3
inputs: shares border with
backward
function: FilterConcept
dependencies: 4
inputs: state of Germany
function: Or
dependencies: 2
5
function: Count
dependencies: 6