Simple Question (Direct)
Simple Question
Q15735132
P19
Q515
USER
Which city was Josef Neumann born in ?
(Q15735132,P19,c(Q515))
action filter_type
action find
entity Q15735132
relation P19
type Q515
['Q15735132', 'P19', {'concept': 'Q515'}]
SELECT DISTINCT ?m WHERE { resource:Q15735132 property:P19 ?m . ?m rdf:type ontology:Q515 }
Josef Neumann
action filter_type
action find
entity Josef Neumann
relation place of birth
type city
['Josef Neumann', 'place of birth', {'concept': 'city'}]
SELECT DISTINCT ?m WHERE { resource:Josef_Neumann property:place_of_birth ?m . ?m rdf:type ontology:city }
[]
city
Q1015273
SYSTEM
Nové Strašecí
Q1015273
(Q15735132,P19,c(Q515))
action filter_type
action find
entity Q15735132
relation P19
type Q515
Josef Neumann was born in [ANSWER]
['Q15735132', 'P19', {'concept': 'Q515'}]
SELECT DISTINCT ?m WHERE { resource:Q15735132 property:P19 ?m . ?m rdf:type ontology:Q515 }
Nové Strašecí
Josef Neumann was born in Nové Strašecí
Nové Strašecí
action filter_type
action find
entity Josef Neumann
relation place of birth
type city
['Josef Neumann', 'place of birth', {'concept': 'city'}]
SELECT DISTINCT ?m WHERE { resource:Josef_Neumann property:place_of_birth ?m . ?m rdf:type ontology:city }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q1015273
P47
Q515
USER
Which city shares border with that one ?
(Q1015273,P47,c(Q515))
action filter_type
action find
entity Q1015273
relation P47
type Q515
['Q1015273', 'P47', {'concept': 'Q515'}]
SELECT DISTINCT ?w WHERE { resource:Q1015273 property:P47 ?w . ?w rdf:type ontology:Q515 }
Nové Strašecí
action filter_type
action find
entity Nové Strašecí
relation shares border with
type city
['Nové Strašecí', 'shares border with', {'concept': 'city'}]
SELECT DISTINCT ?w WHERE { resource:Nové_Strašecí property:shares_border_with ?w . ?w rdf:type ontology:city }
[]
city
Q158432
SYSTEM
Stochov
Q158432
(Q1015273,P47,c(Q515))
action filter_type
action find
entity Q1015273
relation P47
type Q515
[ANSWER] shares border with that one
['Q1015273', 'P47', {'concept': 'Q515'}]
SELECT DISTINCT ?w WHERE { resource:Q1015273 property:P47 ?w . ?w rdf:type ontology:Q515 }
Stochov
Stochov shares border with that one
Stochov
action filter_type
action find
entity Nové Strašecí
relation shares border with
type city
['Nové Strašecí', 'shares border with', {'concept': 'city'}]
SELECT DISTINCT ?w WHERE { resource:Nové_Strašecí property:shares_border_with ?w . ?w rdf:type ontology:city }
[]
Verification (Boolean) (All)
Verification|2 entities, both direct
Q158432 Q213
P17
Q15617994
USER
Is Stochov present in Czech Republic ?
(Q158432,P17,Q213)
action is_in
entity Q213
action find
entity Q158432
relation P17
['Q158432', 'P17', 'Q213']
ASK WHERE { resource:Q158432 property:P17 resource:Q213 }
Stochov Czech Republic
action is_in
entity Czech Republic
action find
entity Stochov
relation country
['Stochov', 'country', 'Czech Republic']
ASK WHERE { resource:Stochov property:country resource:Czech_Republic }
[]
designation for an administrative territorial entity
SYSTEM
YES
(Q158432,P17,Q213)
action is_in
entity Q213
action find
entity Q158432
relation P17
[ANSWER]
['Q158432', 'P17', 'Q213']
ASK WHERE { resource:Q158432 property:P17 resource:Q213 }
Yes
action is_in
entity Czech Republic
action find
entity Stochov
relation country
['Stochov', 'country', 'Czech Republic']
ASK WHERE { resource:Stochov property:country resource:Czech_Republic }
[]
Verification (Boolean) (All)
Verification|2 entities, both direct
Q1015273 Q213
P17
Q15617994
USER
Is Nové Strašecí present in Czech Republic ?
(Q1015273,P17,Q213)
action is_in
entity Q213
action find
entity Q1015273
relation P17
['Q1015273', 'P17', 'Q213']
ASK WHERE { resource:Q1015273 property:P17 resource:Q213 }
Nové Strašecí Czech Republic
action is_in
entity Czech Republic
action find
entity Nové Strašecí
relation country
['Nové Strašecí', 'country', 'Czech Republic']
ASK WHERE { resource:Nové_Strašecí property:country resource:Czech_Republic }
[]
designation for an administrative territorial entity
SYSTEM
YES
(Q1015273,P17,Q213)
action is_in
entity Q213
action find
entity Q1015273
relation P17
[ANSWER]
['Q1015273', 'P17', 'Q213']
ASK WHERE { resource:Q1015273 property:P17 resource:Q213 }
Yes
action is_in
entity Czech Republic
action find
entity Nové Strašecí
relation country
['Nové Strašecí', 'country', 'Czech Republic']
ASK WHERE { resource:Nové_Strašecí property:country resource:Czech_Republic }
[]
Comparative Reasoning (All)
Comparative|More/Less|Mult. entity type
Q15379
P1376
Q515 Q1048835 Q515
USER
Which cities are the capital of approximately the same number of cities and political territories as Kendari ?
(c(Q515),P1376,c(Q515)|c(Q1048835))
action approx
action union
action find_tuple_counts
relation P1376
type Q515
type Q515
action find_tuple_counts
relation P1376
type Q515
type Q1048835
action count
action filter_multi_types
action find
entity Q15379
relation P1376
type Q515
type Q1048835
[{'concept': 'Q515'}, 'P1376', [{'concept': 'Q515'}, {'concept': 'Q1048835'}]]
SELECT DISTINCT ?n WHERE { { SELECT DISTINCT ?n ( COUNT ( ?a ) AS ?c ) WHERE { ?a rdf:type ?h . VALUES ( ?h ) { ( ontology:Q1048835 ) ( ontology:Q515 ) } } GROUP BY ?n } . { SELECT DISTINCT ( COUNT ( ?k ) AS ?l ) WHERE { resource:Q15379 property:P1376 ?k . { { ?k rdf:type ontology:Q515 } UNION { ?k rdf:type ontology:Q1048835 } } } } . FILTER ( ?c = ?l ) }
Kendari
action approx
action union
action find_tuple_counts
relation capital of
type city
type city
action find_tuple_counts
relation capital of
type city
type political territorial entity
action count
action filter_multi_types
action find
entity Kendari
relation capital of
type city
type political territorial entity
[{'concept': 'city'}, 'capital of', [{'concept': 'city'}, {'concept': 'political territorial entity'}]]
SELECT DISTINCT ?n WHERE { { SELECT DISTINCT ?n ( COUNT ( ?a ) AS ?c ) WHERE { ?a rdf:type ?h . VALUES ( ?h ) { ( ontology:political_territorial_entity ) ( ontology:city ) } } GROUP BY ?n } . { SELECT DISTINCT ( COUNT ( ?k ) AS ?l ) WHERE { resource:Kendari property:capital_of ?k . { { ?k rdf:type ontology:city } UNION { ?k rdf:type ontology:political_territorial_entity } } } } . FILTER ( ?c = ?l ) }
[]
city political territorial entity city
Q1899 Q1731 Q14960
SYSTEM
Kyiv, Dresden, Brno
Q15826 Q39738 Q10126 Q1710 Q14525 Q3042 Q3974 Q873377 Q8131 Q4024 Q1711 Q27860 Q3806 Q592338 Q52607 Q5779 Q1696 Q41474 Q1070920 Q174096 Q111739 Q18970 Q432169 Q147738 Q3926 Q11462 Q3214 Q1000336 Q583137 Q1019949 Q235004 Q725168 Q1899 Q1410 Q12062 Q2966 Q1467 Q14499 Q12245 Q1844 Q10389 Q35925 Q15379 Q1723 Q459787 Q1025387 Q191651 Q14819 Q5285 Q14182 Q7568 Q1731 Q1636 Q7786 Q10104 Q1020939 Q155674 Q314686 Q2180 Q14960 Q874270 Q2978 Q14821 Q2079 Q8156 Q1856 Q4007 Q14168 Q55598 Q1826 Q542154 Q7253 Q2936 Q2749 Q63145 Q2119 Q5972 Q1645 Q7578 Q14126 Q15847 Q2209 Q2200 Q16506 Q14155 Q14409 Q40626 Q55740 Q57944 Q2795 Q8179 Q5217 Q1020709 Q2152435 Q3935 Q3750 Q894059 Q183111 Q40584 Q1067897 Q11506 Q107624 Q8042 Q50179 Q104125 Q2999
(c(Q515),P1376,c(Q515)|c(Q1048835))
action approx
action union
action find_tuple_counts
relation P1376
type Q515
type Q515
action find_tuple_counts
relation P1376
type Q515
type Q1048835
action count
action filter_multi_types
action find
entity Q15379
relation P1376
type Q515
type Q1048835
[ANSWERS] are the capital of approximately the same number of cities and political territories as Kendari
[{'concept': 'Q515'}, 'P1376', [{'concept': 'Q515'}, {'concept': 'Q1048835'}]]
SELECT DISTINCT ?n WHERE { { SELECT DISTINCT ?n ( COUNT ( ?a ) AS ?c ) WHERE { ?a rdf:type ?h . VALUES ( ?h ) { ( ontology:Q1048835 ) ( ontology:Q515 ) } } GROUP BY ?n } . { SELECT DISTINCT ( COUNT ( ?k ) AS ?l ) WHERE { resource:Q15379 property:P1376 ?k . { { ?k rdf:type ontology:Q515 } UNION { ?k rdf:type ontology:Q1048835 } } } } . FILTER ( ?c = ?l ) }
Palu Laoag Serang Isabela City Gorontalo Offenbach am Main Landshut Dumaguete Palembang Frankfurt (Oder) Potsdam Jayapura Tübingen Marawi Mar del Plata Banda Aceh Legazpi Kingstown Mamuju Sorsogon City Puerto Princesa Ambon Dipolog Saint Helier Pretoria Surabaya Cottbus Tandil Kidapawan Surigao City Vigan Tagum Kyiv Gibraltar Torgau Heidelberg Cebu City Samarinda Stanley Vaduz Bandung Tabuk Kendari Batangas City Iloilo City Maasin Masbate City Freiberg Tarlac Banjarmasin Yogyakarta Dresden Antipolo Pekanbaru Tanjung Pinang Digos Tandag Mati Malolos Brno Pagadian Regensburg Coburg Leipzig Bandar Lampung Malaybalay Rosenheim Pontianak Palayan Tagbilaran Koronadal Padang Oldenburg Augsburg Imus Mannheim Medan Cagayan de Oro Jambi Mataram Manado Roxas Tuguegarao České Budějovice Kupang Palangkaraya Tacloban San Fernando Annaberg-Buchholz Chemnitz Pangkal Pinang Bacolod Catbalogan Miramar Windhoek Gera Borongan Jihlava San Fernando Oroquieta Denpasar Calapan Bengkulu Ilagan Lucena Würzburg
Kyiv, Dresden and Brno are the capital of approximately the same number of cities and political territories as Kendari
Kyiv Dresden Brno
action approx
action union
action find_tuple_counts
relation capital of
type city
type city
action find_tuple_counts
relation capital of
type city
type political territorial entity
action count
action filter_multi_types
action find
entity Kendari
relation capital of
type city
type political territorial entity
[{'concept': 'city'}, 'capital of', [{'concept': 'city'}, {'concept': 'political territorial entity'}]]
SELECT DISTINCT ?n WHERE { { SELECT DISTINCT ?n ( COUNT ( ?a ) AS ?c ) WHERE { ?a rdf:type ?h . VALUES ( ?h ) { ( ontology:political_territorial_entity ) ( ontology:city ) } } GROUP BY ?n } . { SELECT DISTINCT ( COUNT ( ?k ) AS ?l ) WHERE { resource:Kendari property:capital_of ?k . { { ?k rdf:type ontology:city } UNION { ?k rdf:type ontology:political_territorial_entity } } } } . FILTER ( ?c = ?l ) }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q26488401 Q15379
P17
Q15617994
USER
Which administrative territories do Kendari or Holly Cottage belong to ?
OR((Q15379,P17,c(Q15617994)), (Q26488401,P17,c(Q15617994)))
action filter_type
action union
action find
entity Q15379
relation P17
action find
entity Q26488401
relation P17
type Q15617994
{'OR': [['Q15379', 'P17', {'concept': 'Q15617994'}], ['Q26488401', 'P17', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?m WHERE { ?m rdf:type ontology:Q15617994 . { { resource:Q15379 property:P17 ?m } UNION { resource:Q26488401 property:P17 ?m } } }
Holly Cottage Kendari
action filter_type
action union
action find
entity Kendari
relation country
action find
entity Holly Cottage
relation country
type designation for an administrative territorial entity
{'OR': [['Kendari', 'country', {'concept': 'designation for an administrative territorial entity'}], ['Holly Cottage', 'country', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?m WHERE { ?m rdf:type ontology:designation_for_an_administrative_territorial_entity . { { resource:Kendari property:country ?m } UNION { resource:Holly_Cottage property:country ?m } } }
[]
designation for an administrative territorial entity
Q252 Q145
SYSTEM
Indonesia, United Kingdom
Q252 Q145
OR((Q15379,P17,c(Q15617994)), (Q26488401,P17,c(Q15617994)))
action filter_type
action union
action find
entity Q15379
relation P17
action find
entity Q26488401
relation P17
type Q15617994
Kendari or Holly Cottage belong to [ANSWERS]
{'OR': [['Q15379', 'P17', {'concept': 'Q15617994'}], ['Q26488401', 'P17', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?m WHERE { ?m rdf:type ontology:Q15617994 . { { resource:Q15379 property:P17 ?m } UNION { resource:Q26488401 property:P17 ?m } } }
Indonesia United Kingdom
Kendari or Holly Cottage belong to Indonesia and United Kingdom
Indonesia United Kingdom
action filter_type
action union
action find
entity Kendari
relation country
action find
entity Holly Cottage
relation country
type designation for an administrative territorial entity
{'OR': [['Kendari', 'country', {'concept': 'designation for an administrative territorial entity'}], ['Holly Cottage', 'country', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?m WHERE { ?m rdf:type ontology:designation_for_an_administrative_territorial_entity . { { resource:Kendari property:country ?m } UNION { resource:Holly_Cottage property:country ?m } } }
[]
Verification (Boolean) (All)
Verification|one entity, multiple entities (as object) referred indirectly
Q12523869
P27
Q502895
USER
Are Wahyu Soeparno Putro a native of those administrative territories ?
(Q12523869,P27,Q252) (Q12523869,P27,Q145)
action is_in
entity prev_answer
action find
entity Q12523869
relation P27
['Q12523869', 'P27', 'Q252'] ['Q12523869', 'P27', 'Q145']
ASK WHERE { VALUES ( ?t ) { ( resource:Q252 ) ( resource:Q145 ) } . resource:Q12523869 property:P27 ?t }
Wahyu Soeparno Putro
action is_in
entity prev_answer
action find
entity Wahyu Soeparno Putro
relation country of citizenship
['Wahyu Soeparno Putro', 'country of citizenship', 'Indonesia'] ['Wahyu Soeparno Putro', 'country of citizenship', 'United Kingdom']
ASK WHERE { VALUES ( ?t ) { ( resource:Indonesia ) ( resource:United_Kingdom ) } . resource:Wahyu_Soeparno_Putro property:country_of_citizenship ?t }
[]
common name
SYSTEM
YES
(Q12523869,P27,Q252) (Q12523869,P27,Q145)
action is_in
entity prev_answer
action find
entity Q12523869
relation P27
[ANSWER]
['Q12523869', 'P27', 'Q252'] ['Q12523869', 'P27', 'Q145']
ASK WHERE { VALUES ( ?t ) { ( resource:Q252 ) ( resource:Q145 ) } . resource:Q12523869 property:P27 ?t }
Yes
action is_in
entity prev_answer
action find
entity Wahyu Soeparno Putro
relation country of citizenship
['Wahyu Soeparno Putro', 'country of citizenship', 'Indonesia'] ['Wahyu Soeparno Putro', 'country of citizenship', 'United Kingdom']
ASK WHERE { VALUES ( ?t ) { ( resource:Indonesia ) ( resource:United_Kingdom ) } . resource:Wahyu_Soeparno_Putro property:country_of_citizenship ?t }
[]
Verification (Boolean) (All)
Verification|3 entities, all direct, 2 are query entities
Q15735132 Q16847971 Q13582652
P106
Q12737077
USER
Does Josef Neumann have the profession as Minister of Intergovernmental Affairs and civil engineer ?
(Q15735132,P106,Q16847971) (Q15735132,P106,Q13582652)
action is_in
entity Q15735132
action intersection
action find_reverse
entity Q16847971
relation P106
action find_reverse
entity Q13582652
relation P106
['Q15735132', 'P106', 'Q16847971'] ['Q15735132', 'P106', 'Q13582652']
ASK WHERE { resource:Q15735132 property:P106 resource:Q16847971 . resource:Q15735132 property:P106 resource:Q13582652 }
Josef Neumann Minister of Intergovernmental Affairs civil engineer
action is_in
entity Josef Neumann
action intersection
action find_reverse
entity Minister of Intergovernmental Affairs
relation occupation
action find_reverse
entity civil engineer
relation occupation
['Josef Neumann', 'occupation', 'Minister of Intergovernmental Affairs'] ['Josef Neumann', 'occupation', 'civil engineer']
ASK WHERE { resource:Josef_Neumann property:occupation resource:Minister_of_Intergovernmental_Affairs . resource:Josef_Neumann property:occupation resource:civil_engineer }
[]
occupation
SYSTEM
NO and YES respectively
(Q15735132,P106,Q16847971) (Q15735132,P106,Q13582652)
action is_in
entity Q15735132
action intersection
action find_reverse
entity Q16847971
relation P106
action find_reverse
entity Q13582652
relation P106
[ANSWER]
['Q15735132', 'P106', 'Q16847971'] ['Q15735132', 'P106', 'Q13582652']
ASK WHERE { resource:Q15735132 property:P106 resource:Q16847971 . resource:Q15735132 property:P106 resource:Q13582652 }
NO and YES respectively
action is_in
entity Josef Neumann
action intersection
action find_reverse
entity Minister of Intergovernmental Affairs
relation occupation
action find_reverse
entity civil engineer
relation occupation
['Josef Neumann', 'occupation', 'Minister of Intergovernmental Affairs'] ['Josef Neumann', 'occupation', 'civil engineer']
ASK WHERE { resource:Josef_Neumann property:occupation resource:Minister_of_Intergovernmental_Affairs . resource:Josef_Neumann property:occupation resource:civil_engineer }
[]
Verification (Boolean) (All)
Verification|3 entities, all direct, 2 are query entities
Q158432 Q20120 Q117189
P17
Q15617994
USER
Is Stochov situated in Limone Piemonte and Posta Fibreno ?
(Q158432,P17,Q20120) (Q158432,P17,Q117189)
action is_in
entity Q158432
action intersection
action find_reverse
entity Q20120
relation P17
action find_reverse
entity Q117189
relation P17
['Q158432', 'P17', 'Q20120'] ['Q158432', 'P17', 'Q117189']
ASK WHERE { resource:Q158432 property:P17 resource:Q20120 . resource:Q158432 property:P17 resource:Q117189 }
Stochov Limone Piemonte Posta Fibreno
action is_in
entity Stochov
action intersection
action find_reverse
entity Limone Piemonte
relation country
action find_reverse
entity Posta Fibreno
relation country
['Stochov', 'country', 'Limone Piemonte'] ['Stochov', 'country', 'Posta Fibreno']
ASK WHERE { resource:Stochov property:country resource:Limone_Piemonte . resource:Stochov property:country resource:Posta_Fibreno }
[]
designation for an administrative territorial entity
SYSTEM
NO
(Q158432,P17,Q20120) (Q158432,P17,Q117189)
action is_in
entity Q158432
action intersection
action find_reverse
entity Q20120
relation P17
action find_reverse
entity Q117189
relation P17
[ANSWER]
['Q158432', 'P17', 'Q20120'] ['Q158432', 'P17', 'Q117189']
ASK WHERE { resource:Q158432 property:P17 resource:Q20120 . resource:Q158432 property:P17 resource:Q117189 }
No
action is_in
entity Stochov
action intersection
action find_reverse
entity Limone Piemonte
relation country
action find_reverse
entity Posta Fibreno
relation country
['Stochov', 'country', 'Limone Piemonte'] ['Stochov', 'country', 'Posta Fibreno']
ASK WHERE { resource:Stochov property:country resource:Limone_Piemonte . resource:Stochov property:country resource:Posta_Fibreno }
[]
Logical Reasoning (All)
Logical|Intersection|Multiple_Relation
Q6581072 Q158432
P19 P21
Q502895
USER
Which people were born at Stochov and have the gender as female ?
AND((c(Q502895),P19,Q158432), (c(Q502895),P21,Q6581072))
action filter_type
action intersection
action find_reverse
entity Q158432
relation P19
action find_reverse
entity Q6581072
relation P21
type Q502895
{'AND': [[{'concept': 'Q502895'}, 'P19', 'Q158432'], [{'concept': 'Q502895'}, 'P21', 'Q6581072']]}
SELECT DISTINCT ?c WHERE { ?c property:P21 resource:Q6581072 . ?c property:P19 resource:Q158432 . ?c rdf:type ontology:Q502895 }
female Stochov
action filter_type
action intersection
action find_reverse
entity Stochov
relation place of birth
action find_reverse
entity female
relation gender
type common name
{'AND': [[{'concept': 'common name'}, 'place of birth', 'Stochov'], [{'concept': 'common name'}, 'gender', 'female']]}
SELECT DISTINCT ?c WHERE { ?c property:gender resource:female . ?c property:place_of_birth resource:Stochov . ?c rdf:type ontology:common_name }
[]
common name
Q3435558
SYSTEM
Božena Dobešová
Q3435558
AND((c(Q502895),P19,Q158432), (c(Q502895),P21,Q6581072))
action filter_type
action intersection
action find_reverse
entity Q158432
relation P19
action find_reverse
entity Q6581072
relation P21
type Q502895
[ANSWER] was born at Stochov and have the gender as female
{'AND': [[{'concept': 'Q502895'}, 'P19', 'Q158432'], [{'concept': 'Q502895'}, 'P21', 'Q6581072']]}
SELECT DISTINCT ?c WHERE { ?c property:P21 resource:Q6581072 . ?c property:P19 resource:Q158432 . ?c rdf:type ontology:Q502895 }
Božena Dobešová
Božena Dobešová was born at Stochov and have the gender as female
Božena Dobešová
action filter_type
action intersection
action find_reverse
entity Stochov
relation place of birth
action find_reverse
entity female
relation gender
type common name
{'AND': [[{'concept': 'common name'}, 'place of birth', 'Stochov'], [{'concept': 'common name'}, 'gender', 'female']]}
SELECT DISTINCT ?c WHERE { ?c property:gender resource:female . ?c property:place_of_birth resource:Stochov . ?c rdf:type ontology:common_name }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P190
Q13220204 Q515 Q515
USER
Which cities are partner town of max number of administrative country subdivisions or cities ?
(c(Q515),P190,c(Q13220204)|c(Q515))
action argmax
action union
action find_tuple_counts
relation P190
type Q515
type Q13220204
action find_tuple_counts
relation P190
type Q515
type Q515
[{'concept': 'Q515'}, 'P190', [{'concept': 'Q13220204'}, {'concept': 'Q515'}]]
SELECT DISTINCT ?u WHERE { { SELECT DISTINCT ( MAX ( ?q ) AS ?z ) { SELECT DISTINCT ?f ( COUNT ( ?x ) AS ?q ) WHERE { { ?x rdf:type ontology:Q13220204 . ?f rdf:type ontology:Q515 . ?f property:P190 ?x } UNION { ?f property:P190 ?x . ?f rdf:type ontology:Q515 . ?x rdf:type ontology:Q515 } } GROUP BY ?f } } . { SELECT DISTINCT ?u ( COUNT ( ?n ) AS ?k ) WHERE { VALUES ( ?w ) { ( ontology:Q13220204 ) ( ontology:Q515 ) } . ?n rdf:type ?w } GROUP BY ?u } . FILTER ( ?k = ?z ) }
action argmax
action union
action find_tuple_counts
relation sister city
type city
type second-level administrative country subdivision
action find_tuple_counts
relation sister city
type city
type city
[{'concept': 'city'}, 'sister city', [{'concept': 'second-level administrative country subdivision'}, {'concept': 'city'}]]
SELECT DISTINCT ?u WHERE { { SELECT DISTINCT ( MAX ( ?q ) AS ?z ) { SELECT DISTINCT ?f ( COUNT ( ?x ) AS ?q ) WHERE { { ?x rdf:type ontology:second-level_administrative_country_subdivision . ?f rdf:type ontology:city . ?f property:sister_city ?x } UNION { ?f property:sister_city ?x . ?f rdf:type ontology:city . ?x rdf:type ontology:city } } GROUP BY ?f } } . { SELECT DISTINCT ?u ( COUNT ( ?n ) AS ?k ) WHERE { VALUES ( ?w ) { ( ontology:second-level_administrative_country_subdivision ) ( ontology:city ) } . ?n rdf:type ?w } GROUP BY ?u } . FILTER ( ?k = ?z ) }
[]
second-level administrative country subdivision city city
Q42622
SYSTEM
Suzhou
Q42622
(c(Q515),P190,c(Q13220204)|c(Q515))
action argmax
action union
action find_tuple_counts
relation P190
type Q515
type Q13220204
action find_tuple_counts
relation P190
type Q515
type Q515
[ANSWER] is partner town of max number of administrative country subdivisions or cities
[{'concept': 'Q515'}, 'P190', [{'concept': 'Q13220204'}, {'concept': 'Q515'}]]
SELECT DISTINCT ?u WHERE { { SELECT DISTINCT ( MAX ( ?q ) AS ?z ) { SELECT DISTINCT ?f ( COUNT ( ?x ) AS ?q ) WHERE { { ?x rdf:type ontology:Q13220204 . ?f rdf:type ontology:Q515 . ?f property:P190 ?x } UNION { ?f property:P190 ?x . ?f rdf:type ontology:Q515 . ?x rdf:type ontology:Q515 } } GROUP BY ?f } } . { SELECT DISTINCT ?u ( COUNT ( ?n ) AS ?k ) WHERE { VALUES ( ?w ) { ( ontology:Q13220204 ) ( ontology:Q515 ) } . ?n rdf:type ?w } GROUP BY ?u } . FILTER ( ?k = ?z ) }
Suzhou
Suzhou is partner town of max number of administrative country subdivisions or cities
Suzhou
action argmax
action union
action find_tuple_counts
relation sister city
type city
type second-level administrative country subdivision
action find_tuple_counts
relation sister city
type city
type city
[{'concept': 'city'}, 'sister city', [{'concept': 'second-level administrative country subdivision'}, {'concept': 'city'}]]
SELECT DISTINCT ?u WHERE { { SELECT DISTINCT ( MAX ( ?q ) AS ?z ) { SELECT DISTINCT ?f ( COUNT ( ?x ) AS ?q ) WHERE { { ?x rdf:type ontology:second-level_administrative_country_subdivision . ?f rdf:type ontology:city . ?f property:sister_city ?x } UNION { ?f property:sister_city ?x . ?f rdf:type ontology:city . ?x rdf:type ontology:city } } GROUP BY ?f } } . { SELECT DISTINCT ?u ( COUNT ( ?n ) AS ?k ) WHERE { VALUES ( ?w ) { ( ontology:second-level_administrative_country_subdivision ) ( ontology:city ) } . ?n rdf:type ?w } GROUP BY ?u } . FILTER ( ?k = ?z ) }
[]