Question: Which has a greater majority age, Bahamas (whose nominal GDP is 3111160000 United States dollars) or South Korea?
Choices:
Weimar Republic
Benin
Cambodia
Russian Soviet Federative Socialist Republic
Bahamas
South Korea
South Sudan
Samoa
Switzerland
Socialist Federal Republic of Yugoslavia
Program:
function: Find
inputs: Bahamas
function: FilterNum
dependencies: 0
inputs: nominal GDP
3111160000 United States dollar
=
function: Find
inputs: South Korea
function: SelectBetween
dependencies: 1
2
inputs: age of majority
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Bahamas" . ?e <nominal_GDP> ?pv_1 . ?pv_1 <pred:unit> "United States dollar" . ?pv_1 <pred:value> "3111160000"^^xsd:double . } UNION { ?e <pred:name> "South Korea" . } ?e <age_of_majority> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: South Korea