Question: How many Maryland counties contain the United States city that is the capital of Frederick County (whose subreddit is frederickmd)?
Choices: 0
1
2
3
4
5
6
7
8
9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Maryland" . ?e_1 <located_in_the_administrative_territorial_entity> ?e . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "city of the United States" . ?e_1 <capital_of> ?e_2 . ?e_2 <pred:name> "Frederick County" . ?e_2 <subreddit> ?pv_1 . ?pv_1 <pred:value> "frederickmd" .   }
Program:
function: Find
inputs: Frederick County
function: FilterStr
dependencies: 0
inputs: subreddit
frederickmd
function: Relate
dependencies: 1
inputs: capital of
backward
function: FilterConcept
dependencies: 2
inputs: city of the United States
function: Relate
dependencies: 3
inputs: located in the administrative territorial entity
forward
function: FilterConcept
dependencies: 4
inputs: county of Maryland
function: Count
dependencies: 5
Answer: 1