Question: How many written works originate in the USA or are the topic of The Expendables?
Choices:
45
46
47
48
49
50
51
52
53
54
Program:
function: Find
inputs: United States of America
function: Relate
dependencies: 0
inputs: country of origin
backward
function: FilterConcept
dependencies: 1
inputs: written work
function: Find
inputs: The Expendables
function: Relate
dependencies: 3
inputs: main subject
forward
function: FilterConcept
dependencies: 4
inputs: written work
function: Or
dependencies: 2
5
function: Count
dependencies: 6
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "written work" .  { ?e <country_of_origin> ?e_1 . ?e_1 <pred:name> "United States of America" .  } UNION { ?e_1 <main_subject> ?e . ?e_1 <pred:name> "The Expendables" .  } }
Answer: 47