Question: How many metropolitan areas overlap Pennsylvania or are located in California (which contains San Francisco State University)?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 3
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "metropolitan area" .  { ?e <territory_overlaps> ?e_1 . ?e_1 <pred:name> "Pennsylvania" .  } UNION { ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "California" . ?e_2 <located_in_the_administrative_territorial_entity> ?e_1 . ?e_2 <pred:name> "San Francisco State University" .  } }
Program:
function: Find
inputs: Pennsylvania
function: Relate
dependencies: 0
inputs: territory overlaps
backward
function: FilterConcept
dependencies: 1
inputs: metropolitan area
function: Find
inputs: San Francisco State University
function: Relate
dependencies: 3
inputs: located in the administrative territorial entity
forward
function: Find
inputs: California
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 7
inputs: metropolitan area
function: Or
dependencies: 2
8
function: Count
dependencies: 9