Question: Which area has a larger water percentage, Kentucky (the one that is headed by attorney general) or South Dakota?
Choices:
Kentucky
Massachusetts
New Jersey
South Dakota
New Mexico
California
Illinois
Florida
Hawaii
Iowa
Program:
function: Find
inputs: attorney general
function: Relate
dependencies: 0
inputs: office held by head of government
backward
function: Find
inputs: Kentucky
function: And
dependencies: 1
2
function: Find
inputs: South Dakota
function: SelectBetween
dependencies: 3
4
inputs: water as percent of area
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Kentucky" . ?e <office_held_by_head_of_government> ?e_1 . ?e_1 <pred:name> "attorney general" .   } UNION { ?e <pred:name> "South Dakota" .  } ?e <water_as_percent_of_area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Kentucky