Question: Which has more people, Jeddah or Medina (the one that is the twinned administrative body of Mecca)?
Choices:
Bergen
Kilkenny
Dundee
Cork
Santo Domingo
Chihuahua
Medina
Kingston
Trieste
Jeddah
Program:
function: Find
inputs: Jeddah
function: Find
inputs: Mecca
function: Relate
dependencies: 1
inputs: twinned administrative body
forward
function: Find
inputs: Medina
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: population
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Jeddah" .  } UNION { ?e <pred:name> "Medina" . ?e_1 <twinned_administrative_body> ?e . ?e_1 <pred:name> "Mecca" .   } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Jeddah