Question: Is the population higher in Fairfield, headquarters of Fairfield University, or in Newton, population 7997?
Choices:
Chapel Hill
Westport
Greenwich
Brookline
West Hartford
Uxbridge
Kensington
Newton
Bedford
Fairfield
Answer: Fairfield
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Fairfield" . ?e_1 <headquarters_location> ?e . ?e_1 <pred:name> "Fairfield University" . } UNION { ?e <pred:name> "Newton" . ?e <population> ?pv_1 . ?pv_1 <pred:unit> "1" . ?pv_1 <pred:value> "7997"^^xsd:double . } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Fairfield University
function: Relate
dependencies: 0
inputs: headquarters location
forward
function: Find
inputs: Fairfield
function: And
dependencies: 1
2
function: Find
inputs: Newton
function: FilterNum
dependencies: 4
inputs: population
7997
=
function: SelectBetween
dependencies: 3
5
inputs: population
greater