Question: Is there more area in Nova Scotia or in Quebec which shares a border with Maine?
Choices:
Prince Edward Island
Ontario
Newfoundland and Labrador
Nova Scotia
Manitoba
Saskatchewan
Alberta
British Columbia
New Brunswick
Quebec
Program:
function: Find
inputs: Nova Scotia
function: Find
inputs: Maine
function: Relate
dependencies: 1
inputs: shares border with
forward
function: Find
inputs: Quebec
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: area
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Nova Scotia" .  } UNION { ?e <pred:name> "Quebec" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Maine" .   } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Quebec