Question: How many major cities are St. Petersburg's namesake or have a population other than 760000000?
Choices:
58
59
60
61
62
63
64
65
66
67
Answer: 66
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "big city" .  { ?e_1 <named_after> ?e . ?e_1 <pred:name> "St. Petersburg" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "760000000"^^xsd:double ) .  } }
Program:
function: Find
inputs: St. Petersburg
function: Relate
dependencies: 0
inputs: named after
forward
function: FilterConcept
dependencies: 1
inputs: big city
function: FindAll
function: FilterNum
dependencies: 3
inputs: population
760000000
!=
function: FilterConcept
dependencies: 4
inputs: big city
function: Or
dependencies: 2
5
function: Count
dependencies: 6