Question: How many New York cities are located in or next to the Hudson River or were not established in 1918?
Choices: 10
11
12
13
14
15
16
17
18
19
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "city of New York" .  { ?e <located_in_or_next_to_body_of_water> ?e_1 . ?e_1 <pred:name> "Hudson River" .  } UNION { ?e <inception> ?pv . ?pv <pred:year> ?v . FILTER ( ?v != 1918 ) .  } }
Program:
function: Find
inputs: Hudson River
function: Relate
dependencies: 0
inputs: located in or next to body of water
backward
function: FilterConcept
dependencies: 1
inputs: city of New York
function: FindAll
function: FilterYear
dependencies: 3
inputs: inception
1918
!=
function: FilterConcept
dependencies: 4
inputs: city of New York
function: Or
dependencies: 2
5
function: Count
dependencies: 6
Answer: 13