Question: How is Frederick County that borders Loudoun County related to Frederick whose postal code is 21704?
Choices: candidacy in election
work location
parent astronomical body
sex or gender
capital
has quality
heritage designation
mouth of the watercourse
broadcast by
operator
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Frederick County" . ?e_1 <shares_border_with> ?e_3 . ?e_3 <pred:name> "Loudoun County" . ?e_2 <pred:name> "Frederick" . ?e_2 <postal_code> ?pv . ?pv <pred:value> "21704" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Loudoun County
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: Frederick County
function: And
dependencies: 1
2
function: Find
inputs: Frederick
function: FilterStr
dependencies: 4
inputs: postal code
21704
function: QueryRelation
dependencies: 3
5
Answer: capital