Question: How many feature films follow John Carter (whose cost is 250000000 United States dollars) or have a publication date outside of 2009?
Choices:
49
50
51
52
53
54
55
56
57
58
Answer: 58
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "feature film" .  { ?e_1 <followed_by> ?e . ?e_1 <pred:name> "John Carter" . ?e_1 <cost> ?pv . ?pv <pred:unit> "United States dollar" . ?pv <pred:value> "250000000"^^xsd:double .  } UNION { ?e <publication_date> ?pv . ?pv <pred:year> ?v . FILTER ( ?v != 2009 ) .  } }
Program:
function: Find
inputs: John Carter
function: FilterNum
dependencies: 0
inputs: cost
250000000 United States dollar
=
function: Relate
dependencies: 1
inputs: followed by
forward
function: FilterConcept
dependencies: 2
inputs: feature film
function: FindAll
function: FilterYear
dependencies: 4
inputs: publication date
2009
!=
function: FilterConcept
dependencies: 5
inputs: feature film
function: Or
dependencies: 3
6
function: Count
dependencies: 7