Question: What big city is the capital of the Swedish Empire and has a population of less than 4700000000 in the year 2016)?
Choices:
Mainz
Stockholm
Karlsruhe
Utrecht
Magdeburg
Kassel
Uppsala
Aachen
Stuttgart
Lyon
Program:
function: Find
inputs: Swedish Empire
function: Relate
dependencies: 0
inputs: capital
forward
function: FilterConcept
dependencies: 1
inputs: big city
function: FindAll
function: FilterNum
dependencies: 3
inputs: population
4700000000
<
function: QFilterYear
dependencies: 4
inputs: point in time
2016
=
function: FilterConcept
dependencies: 5
inputs: big city
function: And
dependencies: 2
6
function: What
dependencies: 7
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "big city" . ?e_1 <capital> ?e . ?e_1 <pred:name> "Swedish Empire" .  ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v < "4700000000"^^xsd:double ) . [ <pred:fact_h> ?e ; <pred:fact_r> <population> ; <pred:fact_t> ?pv ] <point_in_time> ?qpv . ?qpv <pred:year> 2016 .  }
Answer: Uppsala