Question: How many London areas are there whose country is the sovereign state that has Iceland–United Kingdom diplomatic relations with Iceland (whose PPP GDP per capita is 43993 Geary–Khamis dollars)?
Choices:
13
14
15
16
17
18
19
20
21
22
Answer: 16
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "area of London" . ?e <country> ?e_1 . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "sovereign state" . ?e_1 <diplomatic_relation> ?e_2 . ?e_2 <pred:name> "Iceland" . ?e_2 <PPP_GDP_per_capita> ?pv . ?pv <pred:unit> "Geary–Khamis dollar" . ?pv <pred:value> "43993"^^xsd:double . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <diplomatic_relation> ; <pred:fact_t> ?e_2 ] <statement_is_subject_of> ?qpv . ?qpv <pred:value> "Iceland–United Kingdom relations" .   }
Program:
function: Find
inputs: Iceland
function: FilterNum
dependencies: 0
inputs: PPP GDP per capita
43993 Geary–Khamis dollar
=
function: Relate
dependencies: 1
inputs: diplomatic relation
backward
function: QFilterStr
dependencies: 2
inputs: statement is subject of
Iceland–United Kingdom relations
function: FilterConcept
dependencies: 3
inputs: sovereign state
function: Relate
dependencies: 4
inputs: country
backward
function: FilterConcept
dependencies: 5
inputs: area of London
function: Count
dependencies: 6