Question: Which has the largest male population among the states of India that have the capital Chandigarh?
Choices:
Maharashtra
Odisha
Haryana
Kerala
Punjab
Gujarat
Andhra Pradesh
Jharkhand
Himachal Pradesh
West Bengal
Program:
function: Find
inputs: Chandigarh
function: Relate
dependencies: 0
inputs: capital of
forward
function: FilterConcept
dependencies: 1
inputs: state of India
function: SelectAmong
dependencies: 2
inputs: male population
largest
SPARQL: SELECT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "state of India" . ?e_1 <capital_of> ?e . ?e_1 <pred:name> "Chandigarh" .  ?e <male_population> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Punjab