Question: What county of California contains San Diego, and this San Diego is also its capital ?
Choices:
Butte County
Contra Costa County
Tuolumne County
San Luis Obispo County
San Diego County
Solano County
San Mateo County
Mariposa County
Alameda County
Shasta County
Answer: San Diego County
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of California" . ?e_1 <located_in_the_administrative_territorial_entity> ?e . ?e_1 <pred:name> "San Diego" .  ?e <capital> ?e_2 . ?e_2 <pred:name> "San Diego" .  }
Program:
function: Find
inputs: San Diego
function: Relate
dependencies: 0
inputs: located in the administrative territorial entity
forward
function: FilterConcept
dependencies: 1
inputs: county of California
function: Find
inputs: San Diego
function: Relate
dependencies: 3
inputs: capital
backward
function: FilterConcept
dependencies: 4
inputs: county of California
function: And
dependencies: 2
5
function: What
dependencies: 6