Question: How many television stations are set up in New York City or are the distributor of Dynasty (the one that originally aired on NBC)?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 2
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "television station" .  { ?e <location_of_formation> ?e_1 . ?e_1 <pred:name> "New York City" .  } UNION { ?e_1 <distributor> ?e . ?e_1 <pred:name> "Dynasty" . ?e_1 <original_network> ?e_2 . ?e_2 <pred:name> "NBC" .  } }
Program:
function: Find
inputs: New York City
function: Relate
dependencies: 0
inputs: location of formation
backward
function: FilterConcept
dependencies: 1
inputs: television station
function: Find
inputs: NBC
function: Relate
dependencies: 3
inputs: original network
backward
function: Find
inputs: Dynasty
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: distributor
forward
function: FilterConcept
dependencies: 7
inputs: television station
function: Or
dependencies: 2
8
function: Count
dependencies: 9