Question: Does Andhra Pradesh (the one that has the captital Hyderabad) or Assam (the one whose rural population is 26807034) has greater population ?
Choices:
Maharashtra
Karnataka
Andhra Pradesh
Punjab
Jharkhand
West Bengal
Kerala
Assam
Himachal Pradesh
Odisha
Answer: Andhra Pradesh
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Andhra Pradesh" . ?e <capital> ?e_1 . ?e_1 <pred:name> "Hyderabad" . } UNION { ?e <pred:name> "Assam" . ?e <rural_population> ?pv_1 . ?pv_1 <pred:unit> "1" . ?pv_1 <pred:value> "26807034"^^xsd:double . } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Hyderabad
function: Relate
dependencies: 0
inputs: capital
backward
function: Find
inputs: Andhra Pradesh
function: And
dependencies: 1
2
function: Find
inputs: Assam
function: FilterNum
dependencies: 4
inputs: rural population
26807034
=
function: SelectBetween
dependencies: 3
5
inputs: population
greater