Question: How many cities use German or have a diplomatic relation with Canada?
Choices: 0
1
2
3
4
5
6
7
8
9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "city" .  { ?e <language_used> ?e_1 . ?e_1 <pred:name> "German" .  } UNION { ?e <diplomatic_relation> ?e_1 . ?e_1 <pred:name> "Canada" .  } }
Program:
function: Find
inputs: German
function: Relate
dependencies: 0
inputs: language used
backward
function: FilterConcept
dependencies: 1
inputs: city
function: Find
inputs: Canada
function: Relate
dependencies: 3
inputs: diplomatic relation
backward
function: FilterConcept
dependencies: 4
inputs: city
function: Or
dependencies: 2
5
function: Count
dependencies: 6
Answer: 2