Question: How many ethnic communities do we know that are geographically distributed within New York (official website http://www.ny.gov/) or contain less than 950 million people?
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> "ethnic community" .  { ?e <geographic_distribution> ?e_1 . ?e_1 <pred:name> "New York" . ?e_1 <official_website> ?pv . ?pv <pred:value> "http://www.ny.gov/" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v < "950000000"^^xsd:double ) .  } }
Program:
function: Find
inputs: New York
function: FilterStr
dependencies: 0
inputs: official website
http://www.ny.gov/
function: Relate
dependencies: 1
inputs: geographic distribution
backward
function: FilterConcept
dependencies: 2
inputs: ethnic community
function: FindAll
function: FilterNum
dependencies: 4
inputs: population
950000000
<
function: FilterConcept
dependencies: 5
inputs: ethnic community
function: Or
dependencies: 3
6
function: Count
dependencies: 7
Answer: 2