Simple Question (Direct)
Simple Question
Q17044788
P39
Q12737077
USER
What was the position for which Gerard Martí Figueras i Albà was appointed ?
(Q17044788,P39,c(Q12737077))
action filter_type
action find
entity Q17044788
relation P39
type Q12737077
['Q17044788', 'P39', {'concept': 'Q12737077'}]
SELECT DISTINCT ?r WHERE { resource:Q17044788 property:P39 ?r . ?r rdf:type ontology:Q12737077 }
Gerard Martí Figueras i Albà
action filter_type
action find
entity Gerard Martí Figueras i Albà
relation position held
type occupation
['Gerard Martí Figueras i Albà', 'position held', {'concept': 'occupation'}]
SELECT DISTINCT ?r WHERE { resource:Gerard_Martí_Figueras_i_Albà property:position_held ?r . ?r rdf:type ontology:occupation }
[]
occupation
Q18714088
SYSTEM
Member of the Catalan Parliament
Q18714088
(Q17044788,P39,c(Q12737077))
action filter_type
action find
entity Q17044788
relation P39
type Q12737077
[ANSWER]
['Q17044788', 'P39', {'concept': 'Q12737077'}]
SELECT DISTINCT ?r WHERE { resource:Q17044788 property:P39 ?r . ?r rdf:type ontology:Q12737077 }
Member of the Catalan Parliament
Member of the Catalan Parliament
Member of the Catalan Parliament
action filter_type
action find
entity Gerard Martí Figueras i Albà
relation position held
type occupation
['Gerard Martí Figueras i Albà', 'position held', {'concept': 'occupation'}]
SELECT DISTINCT ?r WHERE { resource:Gerard_Martí_Figueras_i_Albà property:position_held ?r . ?r rdf:type ontology:occupation }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q17044788
P937
Q56061
USER
Which is the work location of Gerard Martí Figueras i Albà ?
(Q17044788,P937,c(Q56061))
action filter_type
action find
entity Q17044788
relation P937
type Q56061
['Q17044788', 'P937', {'concept': 'Q56061'}]
SELECT DISTINCT ?z WHERE { ?z rdf:type ontology:Q56061 . resource:Q17044788 property:P937 ?z }
Gerard Martí Figueras i Albà
action filter_type
action find
entity Gerard Martí Figueras i Albà
relation work location
type administrative territorial entity
['Gerard Martí Figueras i Albà', 'work location', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ?z WHERE { ?z rdf:type ontology:administrative_territorial_entity . resource:Gerard_Martí_Figueras_i_Albà property:work_location ?z }
[]
administrative territorial entity
Q1492
SYSTEM
Barcelona
Q1492
(Q17044788,P937,c(Q56061))
action filter_type
action find
entity Q17044788
relation P937
type Q56061
[ANSWER] is the work location of Gerard Martí Figueras i Albà
['Q17044788', 'P937', {'concept': 'Q56061'}]
SELECT DISTINCT ?z WHERE { ?z rdf:type ontology:Q56061 . resource:Q17044788 property:P937 ?z }
Barcelona
Barcelona is the work location of Gerard Martí Figueras i Albà
Barcelona
action filter_type
action find
entity Gerard Martí Figueras i Albà
relation work location
type administrative territorial entity
['Gerard Martí Figueras i Albà', 'work location', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ?z WHERE { ?z rdf:type ontology:administrative_territorial_entity . resource:Gerard_Martí_Figueras_i_Albà property:work_location ?z }
[]
Verification (Boolean) (All)
Verification|3 entities, 2 direct, 2(direct) are query entities, subject is indirect
Q1492 Q8678 Q6506
P190
Q56061
USER
Is that administrative territory partner town of Rio de Janeiro and Varna ?
(Q1492,P190,Q8678) (Q1492,P190,Q6506)
action is_in
entity Q1492
action intersection
action find_reverse
entity Q8678
relation P190
action find_reverse
entity Q6506
relation P190
['Q1492', 'P190', 'Q8678'] ['Q1492', 'P190', 'Q6506']
ASK WHERE { resource:Q1492 property:P190 resource:Q8678 . resource:Q1492 property:P190 resource:Q6506 }
Barcelona Rio de Janeiro Varna
action is_in
entity Barcelona
action intersection
action find_reverse
entity Rio de Janeiro
relation sister city
action find_reverse
entity Varna
relation sister city
['Barcelona', 'sister city', 'Rio de Janeiro'] ['Barcelona', 'sister city', 'Varna']
ASK WHERE { resource:Barcelona property:sister_city resource:Rio_de_Janeiro . resource:Barcelona property:sister_city resource:Varna }
[]
administrative territorial entity
SYSTEM
YES
(Q1492,P190,Q8678) (Q1492,P190,Q6506)
action is_in
entity Q1492
action intersection
action find_reverse
entity Q8678
relation P190
action find_reverse
entity Q6506
relation P190
[ANSWER]
['Q1492', 'P190', 'Q8678'] ['Q1492', 'P190', 'Q6506']
ASK WHERE { resource:Q1492 property:P190 resource:Q8678 . resource:Q1492 property:P190 resource:Q6506 }
Yes
action is_in
entity Barcelona
action intersection
action find_reverse
entity Rio de Janeiro
relation sister city
action find_reverse
entity Varna
relation sister city
['Barcelona', 'sister city', 'Rio de Janeiro'] ['Barcelona', 'sister city', 'Varna']
ASK WHERE { resource:Barcelona property:sister_city resource:Rio_de_Janeiro . resource:Barcelona property:sister_city resource:Varna }
[]
Verification (Boolean) (All)
Verification|3 entities, all direct, 2 are query entities
Q18714088 Q5705 Q4494102
P1001
Q1048835
USER
Does Member of the Catalan Parliament have jurisdiction over Catalonia and Fedorivka ?
(Q18714088,P1001,Q5705) (Q18714088,P1001,Q4494102)
action is_in
entity Q18714088
action intersection
action find_reverse
entity Q5705
relation P1001
action find_reverse
entity Q4494102
relation P1001
['Q18714088', 'P1001', 'Q5705'] ['Q18714088', 'P1001', 'Q4494102']
ASK WHERE { resource:Q18714088 property:P1001 resource:Q5705 . resource:Q18714088 property:P1001 resource:Q4494102 }
Member of the Catalan Parliament Catalonia Fedorivka
action is_in
entity Member of the Catalan Parliament
action intersection
action find_reverse
entity Catalonia
relation applies to jurisdiction
action find_reverse
entity Fedorivka
relation applies to jurisdiction
['Member of the Catalan Parliament', 'applies to jurisdiction', 'Catalonia'] ['Member of the Catalan Parliament', 'applies to jurisdiction', 'Fedorivka']
ASK WHERE { resource:Member_of_the_Catalan_Parliament property:applies_to_jurisdiction resource:Catalonia . resource:Member_of_the_Catalan_Parliament property:applies_to_jurisdiction resource:Fedorivka }
[]
political territorial entity
SYSTEM
YES and NO respectively
(Q18714088,P1001,Q5705) (Q18714088,P1001,Q4494102)
action is_in
entity Q18714088
action intersection
action find_reverse
entity Q5705
relation P1001
action find_reverse
entity Q4494102
relation P1001
[ANSWER]
['Q18714088', 'P1001', 'Q5705'] ['Q18714088', 'P1001', 'Q4494102']
ASK WHERE { resource:Q18714088 property:P1001 resource:Q5705 . resource:Q18714088 property:P1001 resource:Q4494102 }
YES and NO respectively
action is_in
entity Member of the Catalan Parliament
action intersection
action find_reverse
entity Catalonia
relation applies to jurisdiction
action find_reverse
entity Fedorivka
relation applies to jurisdiction
['Member of the Catalan Parliament', 'applies to jurisdiction', 'Catalonia'] ['Member of the Catalan Parliament', 'applies to jurisdiction', 'Fedorivka']
ASK WHERE { resource:Member_of_the_Catalan_Parliament property:applies_to_jurisdiction resource:Catalonia . resource:Member_of_the_Catalan_Parliament property:applies_to_jurisdiction resource:Fedorivka }
[]
Logical Reasoning (All)
Logical|Union|Multiple_Relation
Q19468605 Q1492
P276 P190
Q56061
USER
Which administrative territories are twin towns of Barcelona or are the locations of Rijksweg A18 ?
OR((Q1492,P190,c(Q56061)), (Q19468605,P276,c(Q56061)))
action filter_type
action union
action find
entity Q1492
relation P190
action find
entity Q19468605
relation P276
type Q56061
{'OR': [['Q1492', 'P190', {'concept': 'Q56061'}], ['Q19468605', 'P276', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?e WHERE { { { resource:Q1492 property:P190 ?e } UNION { resource:Q19468605 property:P276 ?e } } . ?e rdf:type ontology:Q56061 }
Rijksweg A18 Barcelona
action filter_type
action union
action find
entity Barcelona
relation sister city
action find
entity Rijksweg A18
relation location
type administrative territorial entity
{'OR': [['Barcelona', 'sister city', {'concept': 'administrative territorial entity'}], ['Rijksweg A18', 'location', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?e WHERE { { { resource:Barcelona property:sister_city ?e } UNION { resource:Rijksweg_A18 property:location ?e } } . ?e rdf:type ontology:administrative_territorial_entity }
[]
administrative territorial entity
Q1563 Q365 Q42053 Q85 Q12892 Q340 Q33986 Q8717 Q1210428 Q174
SYSTEM
Some of them are Havana, Cologne, Isfahan, Cairo, Antwerp, Montreal, Valparaíso, Seville, Didam, São Paulo
Q8717 Q8686 Q12892 Q365 Q100 Q52535 Q42053 Q340 Q6506 Q34820 Q1524 Q1210428 Q1563 Q48320 Q33935 Q3561 Q85 Q47492 Q174 Q8678 Q33986 Q6441
OR((Q1492,P190,c(Q56061)), (Q19468605,P276,c(Q56061)))
action filter_type
action union
action find
entity Q1492
relation P190
action find
entity Q19468605
relation P276
type Q56061
[ANSWERS] are twin towns of Barcelona or are the locations of Rijksweg A18
{'OR': [['Q1492', 'P190', {'concept': 'Q56061'}], ['Q19468605', 'P276', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?e WHERE { { { resource:Q1492 property:P190 ?e } UNION { resource:Q19468605 property:P276 ?e } } . ?e rdf:type ontology:Q56061 }
Seville Shanghai Antwerp Cologne Boston Rosario Isfahan Montreal Varna Santo Domingo Athens Didam Havana Kōbe Tel Aviv Algiers Cairo Gaza City São Paulo Rio de Janeiro Valparaíso Montpellier
Havana, Cologne, Isfahan, Cairo, Antwerp, Montreal, Valparaíso, Seville, Didam and São Paulo are twin towns of Barcelona or are the locations of Rijksweg A18
Havana Cologne Isfahan Cairo Antwerp Montreal Valparaíso Seville Didam São Paulo
action filter_type
action union
action find
entity Barcelona
relation sister city
action find
entity Rijksweg A18
relation location
type administrative territorial entity
{'OR': [['Barcelona', 'sister city', {'concept': 'administrative territorial entity'}], ['Rijksweg A18', 'location', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?e WHERE { { { resource:Barcelona property:sister_city ?e } UNION { resource:Rijksweg_A18 property:location ?e } } . ?e rdf:type ontology:administrative_territorial_entity }
[]
Clarification
Quantitative|Count|Logical operators|Indirect
P190
Q515 Q13220204
USER
How many cities and administrative country subdivisions are sister towns of that administrative territory ?
(Q174,P190,c(Q515)) (Q174,P190,c(Q13220204)) (Q1563,P190,c(Q515)) (Q1563,P190,c(Q13220204)) (Q365,P190,c(Q515)) (Q365,P190,c(Q13220204)) (Q42053,P190,c(Q515)) (Q42053,P190,c(Q13220204)) (Q85,P190,c(Q515)) (Q85,P190,c(Q13220204)) (Q12892,P190,c(Q515)) (Q12892,P190,c(Q13220204)) (Q340,P190,c(Q515)) (Q340,P190,c(Q13220204)) (Q33986,P190,c(Q515)) (Q33986,P190,c(Q13220204)) (Q8717,P190,c(Q515)) (Q8717,P190,c(Q13220204)) (Q1210428,P190,c(Q515)) (Q1210428,P190,c(Q13220204)) (Q174,P190,c(Q515)) (Q174,P190,c(Q13220204))
['Q174', 'P190', {'concept': 'Q515'}] ['Q174', 'P190', {'concept': 'Q13220204'}] ['Q1563', 'P190', {'concept': 'Q515'}] ['Q1563', 'P190', {'concept': 'Q13220204'}] ['Q365', 'P190', {'concept': 'Q515'}] ['Q365', 'P190', {'concept': 'Q13220204'}] ['Q42053', 'P190', {'concept': 'Q515'}] ['Q42053', 'P190', {'concept': 'Q13220204'}] ['Q85', 'P190', {'concept': 'Q515'}] ['Q85', 'P190', {'concept': 'Q13220204'}] ['Q12892', 'P190', {'concept': 'Q515'}] ['Q12892', 'P190', {'concept': 'Q13220204'}] ['Q340', 'P190', {'concept': 'Q515'}] ['Q340', 'P190', {'concept': 'Q13220204'}] ['Q33986', 'P190', {'concept': 'Q515'}] ['Q33986', 'P190', {'concept': 'Q13220204'}] ['Q8717', 'P190', {'concept': 'Q515'}] ['Q8717', 'P190', {'concept': 'Q13220204'}] ['Q1210428', 'P190', {'concept': 'Q515'}] ['Q1210428', 'P190', {'concept': 'Q13220204'}] ['Q174', 'P190', {'concept': 'Q515'}] ['Q174', 'P190', {'concept': 'Q13220204'}]
SELECT DISTINCT ( COUNT ( ?z ) AS ?x ) WHERE { { { resource:Q2331485 property:P190 ?z } UNION { resource:Q2331485 property:P190 ?y } UNION { resource:Q1967008 property:P190 ?z } UNION { resource:Q1967008 property:P190 ?y } UNION { resource:Q104064 property:P190 ?z } UNION { resource:Q104064 property:P190 ?y } UNION { resource:Q1098374 property:P190 ?z } UNION { resource:Q1098374 property:P190 ?y } UNION { resource:Q2456665 property:P190 ?z } UNION { resource:Q2456665 property:P190 ?y } UNION { resource:Q20271781 property:P190 ?z } UNION { resource:Q20271781 property:P190 ?y } UNION { resource:Q1529343 property:P190 ?z } UNION { resource:Q1529343 property:P190 ?y } UNION { resource:Q12834562 property:P190 ?z } UNION { resource:Q12834562 property:P190 ?y } UNION { resource:Q295715 property:P190 ?z } UNION { resource:Q295715 property:P190 ?y } UNION { resource:Q1210428 property:P190 ?z } UNION { resource:Q1210428 property:P190 ?y } UNION { resource:Q2331485 property:P190 ?z } UNION { resource:Q2331485 property:P190 ?y } } . ?z rdf:type ontology:Q7930989 . ?y rdf:type ontology:Q13220204 }
['São Paulo', 'sister city', {'concept': 'city'}] ['São Paulo', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Havana', 'sister city', {'concept': 'city'}] ['Havana', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Cologne', 'sister city', {'concept': 'city'}] ['Cologne', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Isfahan', 'sister city', {'concept': 'city'}] ['Isfahan', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Cairo', 'sister city', {'concept': 'city'}] ['Cairo', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Antwerp', 'sister city', {'concept': 'city'}] ['Antwerp', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Montreal', 'sister city', {'concept': 'city'}] ['Montreal', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Valparaíso', 'sister city', {'concept': 'city'}] ['Valparaíso', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Seville', 'sister city', {'concept': 'city'}] ['Seville', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Didam', 'sister city', {'concept': 'city'}] ['Didam', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['São Paulo', 'sister city', {'concept': 'city'}] ['São Paulo', 'sister city', {'concept': 'second-level administrative country subdivision'}]
SELECT DISTINCT ( COUNT ( ?z ) AS ?x ) WHERE { { { resource:São_Paulo property:sister_city ?z } UNION { resource:São_Paulo property:sister_city ?y } UNION { resource:Havana property:sister_city ?z } UNION { resource:Havana property:sister_city ?y } UNION { resource:Cologne property:sister_city ?z } UNION { resource:Cologne property:sister_city ?y } UNION { resource:Isfahan property:sister_city ?z } UNION { resource:Isfahan property:sister_city ?y } UNION { resource:Cairo property:sister_city ?z } UNION { resource:Cairo property:sister_city ?y } UNION { resource:Antwerp property:sister_city ?z } UNION { resource:Antwerp property:sister_city ?y } UNION { resource:Montreal property:sister_city ?z } UNION { resource:Montreal property:sister_city ?y } UNION { resource:Valparaíso property:sister_city ?z } UNION { resource:Valparaíso property:sister_city ?y } UNION { resource:Seville property:sister_city ?z } UNION { resource:Seville property:sister_city ?y } UNION { resource:Didam property:sister_city ?z } UNION { resource:Didam property:sister_city ?y } UNION { resource:São_Paulo property:sister_city ?z } UNION { resource:São_Paulo property:sister_city ?y } } . ?z rdf:type ontology:city . ?y rdf:type ontology:second-level_administrative_country_subdivision }
[]
city second-level administrative country subdivision
Quantitative|Count|Mult. entity type|Clarification
Q365
SYSTEM
Did you mean Cologne ?
[ANSWER]
SELECT DISTINCT ( COUNT ( ?z ) AS ?x ) WHERE { { { resource:Q2331485 property:P190 ?z } UNION { resource:Q2331485 property:P190 ?y } UNION { resource:Q1967008 property:P190 ?z } UNION { resource:Q1967008 property:P190 ?y } UNION { resource:Q104064 property:P190 ?z } UNION { resource:Q104064 property:P190 ?y } UNION { resource:Q1098374 property:P190 ?z } UNION { resource:Q1098374 property:P190 ?y } UNION { resource:Q2456665 property:P190 ?z } UNION { resource:Q2456665 property:P190 ?y } UNION { resource:Q20271781 property:P190 ?z } UNION { resource:Q20271781 property:P190 ?y } UNION { resource:Q1529343 property:P190 ?z } UNION { resource:Q1529343 property:P190 ?y } UNION { resource:Q12834562 property:P190 ?z } UNION { resource:Q12834562 property:P190 ?y } UNION { resource:Q295715 property:P190 ?z } UNION { resource:Q295715 property:P190 ?y } UNION { resource:Q1210428 property:P190 ?z } UNION { resource:Q1210428 property:P190 ?y } UNION { resource:Q2331485 property:P190 ?z } UNION { resource:Q2331485 property:P190 ?y } } . ?z rdf:type ontology:Q7930989 . ?y rdf:type ontology:Q13220204 }
Did you mean Cologne ?
Cologne
SELECT DISTINCT ( COUNT ( ?z ) AS ?x ) WHERE { { { resource:São_Paulo property:sister_city ?z } UNION { resource:São_Paulo property:sister_city ?y } UNION { resource:Havana property:sister_city ?z } UNION { resource:Havana property:sister_city ?y } UNION { resource:Cologne property:sister_city ?z } UNION { resource:Cologne property:sister_city ?y } UNION { resource:Isfahan property:sister_city ?z } UNION { resource:Isfahan property:sister_city ?y } UNION { resource:Cairo property:sister_city ?z } UNION { resource:Cairo property:sister_city ?y } UNION { resource:Antwerp property:sister_city ?z } UNION { resource:Antwerp property:sister_city ?y } UNION { resource:Montreal property:sister_city ?z } UNION { resource:Montreal property:sister_city ?y } UNION { resource:Valparaíso property:sister_city ?z } UNION { resource:Valparaíso property:sister_city ?y } UNION { resource:Seville property:sister_city ?z } UNION { resource:Seville property:sister_city ?y } UNION { resource:Didam property:sister_city ?z } UNION { resource:Didam property:sister_city ?y } UNION { resource:São_Paulo property:sister_city ?z } UNION { resource:São_Paulo property:sister_city ?y } } . ?z rdf:type ontology:city . ?y rdf:type ontology:second-level_administrative_country_subdivision }
[]
Quantitative Reasoning (Count) (All)
USER
No, I meant São Paulo. Could you tell me the answer for that?
(Q174,P190,c(Q515)) (Q174,P190,c(Q13220204)) (Q1563,P190,c(Q515)) (Q1563,P190,c(Q13220204)) (Q365,P190,c(Q515)) (Q365,P190,c(Q13220204)) (Q42053,P190,c(Q515)) (Q42053,P190,c(Q13220204)) (Q85,P190,c(Q515)) (Q85,P190,c(Q13220204)) (Q12892,P190,c(Q515)) (Q12892,P190,c(Q13220204)) (Q340,P190,c(Q515)) (Q340,P190,c(Q13220204)) (Q33986,P190,c(Q515)) (Q33986,P190,c(Q13220204)) (Q8717,P190,c(Q515)) (Q8717,P190,c(Q13220204)) (Q1210428,P190,c(Q515)) (Q1210428,P190,c(Q13220204)) (Q174,P190,c(Q515)) (Q174,P190,c(Q13220204))
Q174
['Q174', 'P190', {'concept': 'Q515'}] ['Q174', 'P190', {'concept': 'Q13220204'}] ['Q1563', 'P190', {'concept': 'Q515'}] ['Q1563', 'P190', {'concept': 'Q13220204'}] ['Q365', 'P190', {'concept': 'Q515'}] ['Q365', 'P190', {'concept': 'Q13220204'}] ['Q42053', 'P190', {'concept': 'Q515'}] ['Q42053', 'P190', {'concept': 'Q13220204'}] ['Q85', 'P190', {'concept': 'Q515'}] ['Q85', 'P190', {'concept': 'Q13220204'}] ['Q12892', 'P190', {'concept': 'Q515'}] ['Q12892', 'P190', {'concept': 'Q13220204'}] ['Q340', 'P190', {'concept': 'Q515'}] ['Q340', 'P190', {'concept': 'Q13220204'}] ['Q33986', 'P190', {'concept': 'Q515'}] ['Q33986', 'P190', {'concept': 'Q13220204'}] ['Q8717', 'P190', {'concept': 'Q515'}] ['Q8717', 'P190', {'concept': 'Q13220204'}] ['Q1210428', 'P190', {'concept': 'Q515'}] ['Q1210428', 'P190', {'concept': 'Q13220204'}] ['Q174', 'P190', {'concept': 'Q515'}] ['Q174', 'P190', {'concept': 'Q13220204'}]
['São Paulo', 'sister city', {'concept': 'city'}] ['São Paulo', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Havana', 'sister city', {'concept': 'city'}] ['Havana', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Cologne', 'sister city', {'concept': 'city'}] ['Cologne', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Isfahan', 'sister city', {'concept': 'city'}] ['Isfahan', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Cairo', 'sister city', {'concept': 'city'}] ['Cairo', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Antwerp', 'sister city', {'concept': 'city'}] ['Antwerp', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Montreal', 'sister city', {'concept': 'city'}] ['Montreal', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Valparaíso', 'sister city', {'concept': 'city'}] ['Valparaíso', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Seville', 'sister city', {'concept': 'city'}] ['Seville', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Didam', 'sister city', {'concept': 'city'}] ['Didam', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['São Paulo', 'sister city', {'concept': 'city'}] ['São Paulo', 'sister city', {'concept': 'second-level administrative country subdivision'}]
[]
SYSTEM
6 cities and 3 administrative country subdivisions
Q25444 Q2933 Q2079 Q8684 Q8652 Q2887 Q1486 Q2201876 Q1953
(Q174,P190,c(Q515)) (Q174,P190,c(Q13220204)) (Q1563,P190,c(Q515)) (Q1563,P190,c(Q13220204)) (Q365,P190,c(Q515)) (Q365,P190,c(Q13220204)) (Q42053,P190,c(Q515)) (Q42053,P190,c(Q13220204)) (Q85,P190,c(Q515)) (Q85,P190,c(Q13220204)) (Q12892,P190,c(Q515)) (Q12892,P190,c(Q13220204)) (Q340,P190,c(Q515)) (Q340,P190,c(Q13220204)) (Q33986,P190,c(Q515)) (Q33986,P190,c(Q13220204)) (Q8717,P190,c(Q515)) (Q8717,P190,c(Q13220204)) (Q1210428,P190,c(Q515)) (Q1210428,P190,c(Q13220204)) (Q174,P190,c(Q515)) (Q174,P190,c(Q13220204))
[ANSWER]
['Q174', 'P190', {'concept': 'Q515'}] ['Q174', 'P190', {'concept': 'Q13220204'}] ['Q1563', 'P190', {'concept': 'Q515'}] ['Q1563', 'P190', {'concept': 'Q13220204'}] ['Q365', 'P190', {'concept': 'Q515'}] ['Q365', 'P190', {'concept': 'Q13220204'}] ['Q42053', 'P190', {'concept': 'Q515'}] ['Q42053', 'P190', {'concept': 'Q13220204'}] ['Q85', 'P190', {'concept': 'Q515'}] ['Q85', 'P190', {'concept': 'Q13220204'}] ['Q12892', 'P190', {'concept': 'Q515'}] ['Q12892', 'P190', {'concept': 'Q13220204'}] ['Q340', 'P190', {'concept': 'Q515'}] ['Q340', 'P190', {'concept': 'Q13220204'}] ['Q33986', 'P190', {'concept': 'Q515'}] ['Q33986', 'P190', {'concept': 'Q13220204'}] ['Q8717', 'P190', {'concept': 'Q515'}] ['Q8717', 'P190', {'concept': 'Q13220204'}] ['Q1210428', 'P190', {'concept': 'Q515'}] ['Q1210428', 'P190', {'concept': 'Q13220204'}] ['Q174', 'P190', {'concept': 'Q515'}] ['Q174', 'P190', {'concept': 'Q13220204'}]
SELECT DISTINCT ( COUNT ( ?z ) AS ?x ) WHERE { { { resource:Q2331485 property:P190 ?z } UNION { resource:Q2331485 property:P190 ?y } UNION { resource:Q1967008 property:P190 ?z } UNION { resource:Q1967008 property:P190 ?y } UNION { resource:Q104064 property:P190 ?z } UNION { resource:Q104064 property:P190 ?y } UNION { resource:Q1098374 property:P190 ?z } UNION { resource:Q1098374 property:P190 ?y } UNION { resource:Q2456665 property:P190 ?z } UNION { resource:Q2456665 property:P190 ?y } UNION { resource:Q20271781 property:P190 ?z } UNION { resource:Q20271781 property:P190 ?y } UNION { resource:Q1529343 property:P190 ?z } UNION { resource:Q1529343 property:P190 ?y } UNION { resource:Q12834562 property:P190 ?z } UNION { resource:Q12834562 property:P190 ?y } UNION { resource:Q295715 property:P190 ?z } UNION { resource:Q295715 property:P190 ?y } UNION { resource:Q1210428 property:P190 ?z } UNION { resource:Q1210428 property:P190 ?y } UNION { resource:Q2331485 property:P190 ?z } UNION { resource:Q2331485 property:P190 ?y } } . ?z rdf:type ontology:Q7930989 . ?y rdf:type ontology:Q13220204 }
Funchal Asunción Leipzig Seoul Miami Santiago Buenos Aires Presidente Franco District Yerevan
6 cities and 3 administrative country subdivisions
['São Paulo', 'sister city', {'concept': 'city'}] ['São Paulo', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Havana', 'sister city', {'concept': 'city'}] ['Havana', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Cologne', 'sister city', {'concept': 'city'}] ['Cologne', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Isfahan', 'sister city', {'concept': 'city'}] ['Isfahan', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Cairo', 'sister city', {'concept': 'city'}] ['Cairo', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Antwerp', 'sister city', {'concept': 'city'}] ['Antwerp', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Montreal', 'sister city', {'concept': 'city'}] ['Montreal', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Valparaíso', 'sister city', {'concept': 'city'}] ['Valparaíso', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Seville', 'sister city', {'concept': 'city'}] ['Seville', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['Didam', 'sister city', {'concept': 'city'}] ['Didam', 'sister city', {'concept': 'second-level administrative country subdivision'}] ['São Paulo', 'sister city', {'concept': 'city'}] ['São Paulo', 'sister city', {'concept': 'second-level administrative country subdivision'}]
SELECT DISTINCT ( COUNT ( ?z ) AS ?x ) WHERE { { { resource:São_Paulo property:sister_city ?z } UNION { resource:São_Paulo property:sister_city ?y } UNION { resource:Havana property:sister_city ?z } UNION { resource:Havana property:sister_city ?y } UNION { resource:Cologne property:sister_city ?z } UNION { resource:Cologne property:sister_city ?y } UNION { resource:Isfahan property:sister_city ?z } UNION { resource:Isfahan property:sister_city ?y } UNION { resource:Cairo property:sister_city ?z } UNION { resource:Cairo property:sister_city ?y } UNION { resource:Antwerp property:sister_city ?z } UNION { resource:Antwerp property:sister_city ?y } UNION { resource:Montreal property:sister_city ?z } UNION { resource:Montreal property:sister_city ?y } UNION { resource:Valparaíso property:sister_city ?z } UNION { resource:Valparaíso property:sister_city ?y } UNION { resource:Seville property:sister_city ?z } UNION { resource:Seville property:sister_city ?y } UNION { resource:Didam property:sister_city ?z } UNION { resource:Didam property:sister_city ?y } UNION { resource:São_Paulo property:sister_city ?z } UNION { resource:São_Paulo property:sister_city ?y } } . ?z rdf:type ontology:city . ?y rdf:type ontology:second-level_administrative_country_subdivision }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P609
Q56061 Q83620 Q12280
USER
Which administrative territories are the terminus locations of min number of thoroughfares or bridges ?
(c(Q83620)|c(Q12280),P609,c(Q56061))
action argmin
action union
action find_reverse_tuple_counts
relation P609
type Q56061
type Q83620
action find_reverse_tuple_counts
relation P609
type Q56061
type Q12280
[[{'concept': 'Q83620'}, {'concept': 'Q12280'}], 'P609', {'concept': 'Q56061'}]
SELECT DISTINCT ?l WHERE { { SELECT DISTINCT ( MIN ( ?r ) AS ?t ) { SELECT DISTINCT ?x ( COUNT ( ?b ) AS ?r ) WHERE { { ?b property:P609 ?x . ?b rdf:type ontology:Q83620 . ?x rdf:type ontology:Q56061 } UNION { ?b property:P609 ?x . ?x rdf:type ontology:Q56061 . ?b rdf:type ontology:Q12280 } } GROUP BY ?x } } . { SELECT DISTINCT ?l ( COUNT ( ?i ) AS ?m ) WHERE { { ?i property:P609 ?l . ?l rdf:type ontology:Q56061 . ?i rdf:type ontology:Q83620 } UNION { ?i property:P609 ?l . ?i rdf:type ontology:Q12280 . ?l rdf:type ontology:Q56061 } } GROUP BY ?l } . FILTER ( ?m = ?t ) }
action argmin
action union
action find_reverse_tuple_counts
relation terminus location
type administrative territorial entity
type thoroughfare
action find_reverse_tuple_counts
relation terminus location
type administrative territorial entity
type bridge
[[{'concept': 'thoroughfare'}, {'concept': 'bridge'}], 'terminus location', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ?l WHERE { { SELECT DISTINCT ( MIN ( ?r ) AS ?t ) { SELECT DISTINCT ?x ( COUNT ( ?b ) AS ?r ) WHERE { { ?b property:terminus_location ?x . ?b rdf:type ontology:thoroughfare . ?x rdf:type ontology:administrative_territorial_entity } UNION { ?b property:terminus_location ?x . ?x rdf:type ontology:administrative_territorial_entity . ?b rdf:type ontology:bridge } } GROUP BY ?x } } . { SELECT DISTINCT ?l ( COUNT ( ?i ) AS ?m ) WHERE { { ?i property:terminus_location ?l . ?l rdf:type ontology:administrative_territorial_entity . ?i rdf:type ontology:thoroughfare } UNION { ?i property:terminus_location ?l . ?i rdf:type ontology:bridge . ?l rdf:type ontology:administrative_territorial_entity } } GROUP BY ?l } . FILTER ( ?m = ?t ) }
[]
administrative territorial entity thoroughfare bridge
Q1781 Q956 Q1867
SYSTEM
Budapest, Beijing, Taipei
Q1159408 Q1866725 Q599331 Q81076 Q10084 Q3112494 Q81177 Q2218481 Q2779809 Q238510 Q780923 Q957593 Q581785 Q2207185 Q83178 Q1781774 Q1027049 Q10014 Q6772133 Q185216 Q846242 Q2223679 Q1950380 Q1309 Q832938 Q2684131 Q13415826 Q9920 Q746096 Q883862 Q12912978 Q494631 Q4507706 Q988590 Q149787 Q2372373 Q3020221 Q212686 Q1890499 Q282729 Q3475289 Q937679 Q5529922 Q49274 Q3030085 Q2124272 Q1012006 Q2060859 Q6903267 Q10025 Q3394752 Q43631 Q478036 Q6430673 Q502312 Q1812494 Q262483 Q842477 Q4733779 Q2121249 Q1615972 Q5083 Q9911 Q2376829 Q81086 Q1026976 Q51697 Q51694 Q798 Q793 Q545457 Q1615386 Q932008 Q2473978 Q2026781 Q1840 Q776965 Q3322237 Q2525207 Q5367550 Q9909 Q797512 Q60444 Q2247076 Q1726 Q6373375 Q920932 Q1023246 Q2579355 Q3026315 Q9898 Q3138 Q237692 Q1912125 Q1907250 Q26881 Q3312626 Q5039616 Q16977290 Q579722 Q5182964 Q488545 Q992371 Q2403755 Q83407 Q3030738 Q934511 Q2096849 Q2360370 Q1007168 Q2853591 Q858607 Q959585 Q1615562 Q2893665 Q740852 Q956 Q1770 Q2235855 Q425786 Q279000 Q9832 Q1781 Q2873143 Q168279 Q2318330 Q15156199 Q826048 Q1613459 Q12013510 Q244327 Q605318 Q20203420 Q1890680 Q695417 Q2856996 Q26421 Q10041 Q3330170 Q517423 Q2023889 Q1616642 Q9783 Q2157144 Q2750562 Q743632 Q2543653 Q9871 Q5327973 Q1863836 Q2511595 Q3432009 Q84125 Q736131 Q506745 Q1867 Q690062 Q634481 Q2906589 Q2805272 Q995911 Q166065 Q1007176 Q1241302 Q611722 Q1025080 Q1025089 Q1310 Q5604964 Q3205403 Q2900922 Q77056 Q1258901 Q9934 Q2225613 Q2774284 Q2496189 Q2181173 Q75967 Q2277323 Q2282115 Q1210428 Q60705 Q2289322 Q803903 Q2281208 Q726635 Q230406 Q615732 Q3025598 Q2860067 Q985549 Q971130 Q505601 Q1916586 Q10037 Q2433994 Q743236
(c(Q83620)|c(Q12280),P609,c(Q56061))
action argmin
action union
action find_reverse_tuple_counts
relation P609
type Q56061
type Q83620
action find_reverse_tuple_counts
relation P609
type Q56061
type Q12280
[ANSWERS] are the terminus locations of min number of thoroughfares or bridges
[[{'concept': 'Q83620'}, {'concept': 'Q12280'}], 'P609', {'concept': 'Q56061'}]
SELECT DISTINCT ?l WHERE { { SELECT DISTINCT ( MIN ( ?r ) AS ?t ) { SELECT DISTINCT ?x ( COUNT ( ?b ) AS ?r ) WHERE { { ?b property:P609 ?x . ?b rdf:type ontology:Q83620 . ?x rdf:type ontology:Q56061 } UNION { ?b property:P609 ?x . ?x rdf:type ontology:Q56061 . ?b rdf:type ontology:Q12280 } } GROUP BY ?x } } . { SELECT DISTINCT ?l ( COUNT ( ?i ) AS ?m ) WHERE { { ?i property:P609 ?l . ?l rdf:type ontology:Q56061 . ?i rdf:type ontology:Q83620 } UNION { ?i property:P609 ?l . ?i rdf:type ontology:Q12280 . ?l rdf:type ontology:Q56061 } } GROUP BY ?l } . FILTER ( ?m = ?t ) }
Dandenong Groenekan Biddinghuizen Zierikzee Vlissingen Poeldijk Leersum Oosterbeek Kats Etten Wallasey Den Oever Lepelstraat Terneuzen Almere Ulvsunda Irkeshtam Kampen Marmion Grapevine Nieuw-Lekkerland Uithuizen Mount Barker Maastricht Bodegraven De Punt De Bilt Haarlem North Shields Blerick Oosterhout Sassnitz Dongen Pruszcz Gdański Hendon Kootwijk De Meern Aigio Manjimup Ouderkerk aan de Amstel Schaijk Bunnik Geestdorp Garland Wieringerwerf Maasdam Cruden Bay Nieuw-Beijerland Roosendaal Wierden Catthorpe Leiden Schoonhoven Koondoola Maasdijk Rijswijk Deadwood Oosterzele Almere Poort Stainforth Wateringen Seattle Den Helder Swifterbant Sas van Gent Sale McKinney Grand Prairie Assen Zwolle Nieuw-Vennep Sassenheim Maarssen Ede Poelkapelle Veenendaal Klaipėda Venlo Ochten Elsham, North Lincolnshire Bussum Baarle Drachten Barger-Compascuum Munich Karrinyup Eede Westrozebeke Babberich Terhole Amstelveen Trier Ewijk Klaaswaal Serooskerke Helsingør Middenmeer Carine Alkmaar Ossendrecht Crawley Spijkenisse Bruinisse Terschuur Mons Zuidschermer Papendrecht Stellendam Longtown IJsselmuiden Aberford Strijen Streefkerk Kesteren Beek, Montferland Tessenderlo Beijing Tallinn Aarlanderveen 's-Gravenzande South Shields Eindhoven Budapest Hoek Zbraslav Waverveen Alphen aan den Rijn Waddinxveen Naaldwijk Vught Gorinchem Joondalup Heumen Bad Nieuweschans Bremerton Neeritter Dordrecht Soest Velsen-Zuid Den Dolder Eijsden Thurcroft Roermond Almere Haven Aarsele Nieuw-Amsterdam, Drenthe Den Hoorn, South Holland Tilburg East Butterwick Kamerik Almere Stad Rijkevoort Gouda Alblasserdam Rijswijk Taipei Rønne Gedser Blijham Ens Hoofddorp Lelystad Glanerbrug Dongara Westerland, Netherlands Soesterberg Nieuw- en Sint Joosland Arnhem Greenwood Edgemont Nieuwe Pekela Edam Driebergen-Rijsenburg Hilversum Nieuwdorp Meerkerk Oude-Tonge Bellingwolde Schoondijke Siebengewald Gretna Didam Emmeloord Van Ewijcksluis Bainbridge Island Dinteloord Beek, Ubbergen Zurich, Friesland Breukelen Wedde Cothen Sitia Nieuwe Niedorp Wassenaar Elsloo, Limburg Eemnes Putte, Pays-Bas Diest
Budapest, Beijing and Taipei are the terminus locations of min number of thoroughfares or bridges
Budapest Beijing Taipei
action argmin
action union
action find_reverse_tuple_counts
relation terminus location
type administrative territorial entity
type thoroughfare
action find_reverse_tuple_counts
relation terminus location
type administrative territorial entity
type bridge
[[{'concept': 'thoroughfare'}, {'concept': 'bridge'}], 'terminus location', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ?l WHERE { { SELECT DISTINCT ( MIN ( ?r ) AS ?t ) { SELECT DISTINCT ?x ( COUNT ( ?b ) AS ?r ) WHERE { { ?b property:terminus_location ?x . ?b rdf:type ontology:thoroughfare . ?x rdf:type ontology:administrative_territorial_entity } UNION { ?b property:terminus_location ?x . ?x rdf:type ontology:administrative_territorial_entity . ?b rdf:type ontology:bridge } } GROUP BY ?x } } . { SELECT DISTINCT ?l ( COUNT ( ?i ) AS ?m ) WHERE { { ?i property:terminus_location ?l . ?l rdf:type ontology:administrative_territorial_entity . ?i rdf:type ontology:thoroughfare } UNION { ?i property:terminus_location ?l . ?i rdf:type ontology:bridge . ?l rdf:type ontology:administrative_territorial_entity } } GROUP BY ?l } . FILTER ( ?m = ?t ) }
[]
Logical Reasoning (All)
Logical|Intersection|Single_Relation
Q8684 Q8717
P190
Q56061
USER
Which administrative territories are twin towns of Seville and Seoul ?
AND((Q8717,P190,c(Q56061)), (Q8684,P190,c(Q56061)))
action filter_type
action intersection
action find
entity Q8717
relation P190
action find
entity Q8684
relation P190
type Q56061
{'AND': [['Q8717', 'P190', {'concept': 'Q56061'}], ['Q8684', 'P190', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?t WHERE { resource:Q8717 property:P190 ?t . resource:Q8684 property:P190 ?t . ?t rdf:type ontology:Q56061 }
Seoul Seville
action filter_type
action intersection
action find
entity Seville
relation sister city
action find
entity Seoul
relation sister city
type administrative territorial entity
{'AND': [['Seville', 'sister city', {'concept': 'administrative territorial entity'}], ['Seoul', 'sister city', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?t WHERE { resource:Seville property:sister_city ?t . resource:Seoul property:sister_city ?t . ?t rdf:type ontology:administrative_territorial_entity }
[]
administrative territorial entity
Q220
SYSTEM
Rome
Q220
AND((Q8717,P190,c(Q56061)), (Q8684,P190,c(Q56061)))
action filter_type
action intersection
action find
entity Q8717
relation P190
action find
entity Q8684
relation P190
type Q56061
[ANSWER] is twin towns of Seville and Seoul
{'AND': [['Q8717', 'P190', {'concept': 'Q56061'}], ['Q8684', 'P190', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?t WHERE { resource:Q8717 property:P190 ?t . resource:Q8684 property:P190 ?t . ?t rdf:type ontology:Q56061 }
Rome
Rome is twin towns of Seville and Seoul
Rome
action filter_type
action intersection
action find
entity Seville
relation sister city
action find
entity Seoul
relation sister city
type administrative territorial entity
{'AND': [['Seville', 'sister city', {'concept': 'administrative territorial entity'}], ['Seoul', 'sister city', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?t WHERE { resource:Seville property:sister_city ?t . resource:Seoul property:sister_city ?t . ?t rdf:type ontology:administrative_territorial_entity }
[]