Question: For the province Quebec that shares the border with Newfoundland and Labrador which of the adjacent provinces has the largest area?
Choices:
Alberta
Newfoundland and Labrador
Manitoba
British Columbia
Ontario
Prince Edward Island
Nova Scotia
Saskatchewan
New Brunswick
Quebec
Answer: Ontario
SPARQL: SELECT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "province of Canada" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Quebec" . ?e_2 <shares_border_with> ?e_1 . ?e_2 <pred:name> "Newfoundland and Labrador" .  ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Newfoundland and Labrador
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Quebec
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: shares border with
forward
function: FilterConcept
dependencies: 4
inputs: province of Canada
function: SelectAmong
dependencies: 5
inputs: area
largest