Question: In what country is the University of Waterloo, in Waterloo, population 98780, located?
Choices:
Belgium
Austria
People's Republic of China
Bulgaria
Russia
Canada
Norway
South Africa
Ontario
Iceland
Answer: Canada
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "University of Waterloo" . ?e_2 <pred:name> "Waterloo" . ?e_2 <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> "98780"^^xsd:double . ?e_1 <headquarters_location> ?e_2 . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <headquarters_location> ; <pred:fact_t> ?e_2 ] <country> ?qpv .  }
Program:
function: Find
inputs: University of Waterloo
function: Find
inputs: Waterloo
function: FilterNum
dependencies: 1
inputs: population
98780
=
function: QueryRelationQualifier
dependencies: 0
2
inputs: headquarters location
country