Question: How many cities are there in Venezuela with Valencia as the capital or a population that is not 690000?
Choices:
356
357
358
359
360
361
362
363
364
365
Answer: 357
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "city" .  { ?e_1 <capital_of> ?e . ?e_1 <pred:name> "Valencia" . ?e_1 <country> ?e_2 . ?e_2 <pred:name> "Venezuela" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "690000"^^xsd:double ) .  } }
Program:
function: Find
inputs: Venezuela
function: Relate
dependencies: 0
inputs: country
backward
function: Find
inputs: Valencia
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: capital of
forward
function: FilterConcept
dependencies: 4
inputs: city
function: FindAll
function: FilterNum
dependencies: 6
inputs: population
690000
!=
function: FilterConcept
dependencies: 7
inputs: city
function: Or
dependencies: 5
8
function: Count
dependencies: 9