Question: Does Chhattisgarh (Indian census area code (2001) 22) or Himachal Pradeshm with the capital Shimla, have fewer male inhabitants?
Choices:
West Bengal
Haryana
Kerala
Andhra Pradesh
Karnataka
Punjab
Maharashtra
Odisha
Himachal Pradesh
Jharkhand
Program:
function: Find
inputs: Chhattisgarh
function: FilterStr
dependencies: 0
inputs: Indian census area code (2001)
22
function: Find
inputs: Shimla
function: Relate
dependencies: 2
inputs: capital
backward
function: Find
inputs: Himachal Pradesh
function: And
dependencies: 3
4
function: SelectBetween
dependencies: 1
5
inputs: male population
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Chhattisgarh" . ?e <Indian_census_area_code_(2001)> ?pv_1 . ?pv_1 <pred:value> "22" . } UNION { ?e <pred:name> "Himachal Pradesh" . ?e <capital> ?e_1 . ?e_1 <pred:name> "Shimla" . } ?e <male_population> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Himachal Pradesh