Question: What higher education institution's headquarters is located in Victoria (that is the capital of Vancouver Island) whose postal code V8P 5C2?
Choices:
McNeese State University
Pennsylvania State University
Imperial College London
Panjab University
University of Melbourne
University of Victoria
Presidency University
University of Tehran
King's College London
McMaster University
Answer: University of Victoria
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "higher education institution" . ?e <headquarters_location> ?e_1 . ?e_1 <pred:name> "Victoria" . ?e_2 <capital> ?e_1 . ?e_2 <pred:name> "Vancouver Island" .  [ <pred:fact_h> ?e ; <pred:fact_r> <headquarters_location> ; <pred:fact_t> ?e_1 ] <postal_code> ?qpv . ?qpv <pred:value> "V8P 5C2" .  }
Program:
function: Find
inputs: Vancouver Island
function: Relate
dependencies: 0
inputs: capital
forward
function: Find
inputs: Victoria
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: headquarters location
backward
function: QFilterStr
dependencies: 4
inputs: postal code
V8P 5C2
function: FilterConcept
dependencies: 5
inputs: higher education institution
function: What
dependencies: 6