Question: How many Ireland counties have the capital Limerick and are in the country of Ireland (which has the basic government form of republic)?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 1
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Ireland" . ?e_1 <capital_of> ?e . ?e_1 <pred:name> "Limerick" .  ?e <country> ?e_2 . ?e_2 <pred:name> "Ireland" . ?e_2 <basic_form_of_government> ?e_3 . ?e_3 <pred:name> "republic" .  }
Program:
function: Find
inputs: Limerick
function: Relate
dependencies: 0
inputs: capital of
forward
function: FilterConcept
dependencies: 1
inputs: county of Ireland
function: Find
inputs: republic
function: Relate
dependencies: 3
inputs: basic form of government
backward
function: Find
inputs: Ireland
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: country
backward
function: FilterConcept
dependencies: 7
inputs: county of Ireland
function: And
dependencies: 2
8
function: Count
dependencies: 9