Question: How many independent cities are an administrative division of the United States state that contains Portsmouth (whose official website is http://www.portsmouthva.gov/)?
Choices: 17
18
19
20
21
22
23
24
25
26
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "independent city" . ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "state of the United States" . ?e_3 <located_in_the_administrative_territorial_entity> ?e_1 . ?e_3 <pred:name> "Portsmouth" . ?e_3 <official_website> ?pv . ?pv <pred:value> "http://www.portsmouthva.gov/" .   }
Program:
function: Find
inputs: Portsmouth
function: FilterStr
dependencies: 0
inputs: official website
http://www.portsmouthva.gov/
function: Relate
dependencies: 1
inputs: located in the administrative territorial entity
forward
function: FilterConcept
dependencies: 2
inputs: state of the United States
function: Relate
dependencies: 3
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 4
inputs: independent city
function: Count
dependencies: 5
Answer: 20