Simple Question (Direct)
Simple Question
Q4232633
P19
Q56061
USER
Which administrative territory was Yevgeni Korablyov born at ?
(Q4232633,P19,c(Q56061))
action filter_type
action find
entity Q4232633
relation P19
type Q56061
['Q4232633', 'P19', {'concept': 'Q56061'}]
SELECT DISTINCT ?d WHERE { ?d rdf:type ontology:Q56061 . resource:Q4232633 property:P19 ?d }
Yevgeni Korablyov
action filter_type
action find
entity Yevgeni Korablyov
relation place of birth
type administrative territorial entity
['Yevgeni Korablyov', 'place of birth', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ?d WHERE { ?d rdf:type ontology:administrative_territorial_entity . resource:Yevgeni_Korablyov property:place_of_birth ?d }
[]
administrative territorial entity
Q649
SYSTEM
Moscow
Q649
(Q4232633,P19,c(Q56061))
action filter_type
action find
entity Q4232633
relation P19
type Q56061
Yevgeni Korablyov was born in [ANSWER]
['Q4232633', 'P19', {'concept': 'Q56061'}]
SELECT DISTINCT ?d WHERE { ?d rdf:type ontology:Q56061 . resource:Q4232633 property:P19 ?d }
Moscow
Yevgeni Korablyov was born in Moscow
Moscow
action filter_type
action find
entity Yevgeni Korablyov
relation place of birth
type administrative territorial entity
['Yevgeni Korablyov', 'place of birth', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ?d WHERE { ?d rdf:type ontology:administrative_territorial_entity . resource:Yevgeni_Korablyov property:place_of_birth ?d }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q4232633
P106
Q12737077
USER
What is the job of that person ?
(Q649,P106,c(Q12737077))
action filter_type
action find
entity Q4232633
relation P106
type Q12737077
['Q649', 'P106', {'concept': 'Q12737077'}]
SELECT DISTINCT ?y WHERE { resource:Q4232633 property:P106 ?y . ?y rdf:type ontology:Q12737077 }
Yevgeni Korablyov
action filter_type
action find
entity Yevgeni Korablyov
relation occupation
type occupation
['Moscow', 'occupation', {'concept': 'occupation'}]
SELECT DISTINCT ?y WHERE { resource:Yevgeni_Korablyov property:occupation ?y . ?y rdf:type ontology:occupation }
[]
occupation
Q937857
SYSTEM
association football player
Q937857
(Q649,P106,c(Q12737077))
action filter_type
action find
entity Q4232633
relation P106
type Q12737077
The job of that person is an [ANSWER]
['Q649', 'P106', {'concept': 'Q12737077'}]
SELECT DISTINCT ?y WHERE { resource:Q4232633 property:P106 ?y . ?y rdf:type ontology:Q12737077 }
association football player
The job of that person is an association football player
association football player
action filter_type
action find
entity Yevgeni Korablyov
relation occupation
type occupation
['Moscow', 'occupation', {'concept': 'occupation'}]
SELECT DISTINCT ?y WHERE { resource:Yevgeni_Korablyov property:occupation ?y . ?y rdf:type ontology:occupation }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q649
P159
Q192350
USER
Which ministries have their HQ location at Moscow ?
(c(Q192350),P159,Q649)
action filter_type
action find_reverse
entity Q649
relation P159
type Q192350
[{'concept': 'Q192350'}, 'P159', 'Q649']
SELECT DISTINCT ?p WHERE { ?p property:P159 resource:Q649 . ?p rdf:type ontology:Q192350 }
Moscow
action filter_type
action find_reverse
entity Moscow
relation headquarters location
type ministry
[{'concept': 'ministry'}, 'headquarters location', 'Moscow']
SELECT DISTINCT ?p WHERE { ?p property:headquarters_location resource:Moscow . ?p rdf:type ontology:ministry }
[]
ministry
Q1192838 Q789889 Q4313368
SYSTEM
Ministry of Internal Affairs, Ministry of Foreign Affairs, Ministry of Justice
Q15125193 Q789889 Q4313368 Q1959942 Q1192838 Q2465416
(c(Q192350),P159,Q649)
action filter_type
action find_reverse
entity Q649
relation P159
type Q192350
[ANSWERS] have their HQ location at Moscow
[{'concept': 'Q192350'}, 'P159', 'Q649']
SELECT DISTINCT ?p WHERE { ?p property:P159 resource:Q649 . ?p rdf:type ontology:Q192350 }
Ministry of Construction Industry, Housing and Utilities Sector Ministry of Foreign Affairs Ministry of Justice Ministry of Foreign Affairs Ministry of Internal Affairs Ministry of Culture
Ministry of Internal Affairs, Ministry of Foreign Affairs and Ministry of Justice have their HQ location at Moscow
Ministry of Internal Affairs Ministry of Foreign Affairs Ministry of Justice
action filter_type
action find_reverse
entity Moscow
relation headquarters location
type ministry
[{'concept': 'ministry'}, 'headquarters location', 'Moscow']
SELECT DISTINCT ?p WHERE { ?p property:headquarters_location resource:Moscow . ?p rdf:type ontology:ministry }
[]
Clarification
Simple Question|Single Entity|Indirect
Q4313368
P1001
Q7275
USER
Which state comes under the supervision of that ministry ?
(Q4313368,P1001,c(Q7275))
action filter_type
action find
entity Q4313368
relation P1001
type Q7275
['Q4313368', 'P1001', {'concept': 'Q7275'}]
SELECT DISTINCT ?e WHERE { resource:Q4313368 property:P1001 ?e . ?e rdf:type ontology:Q7275 }
Ministry of Justice
action filter_type
action find
entity Ministry of Justice
relation applies to jurisdiction
type state
['Ministry of Justice', 'applies to jurisdiction', {'concept': 'state'}]
SELECT DISTINCT ?e WHERE { resource:Ministry_of_Justice property:applies_to_jurisdiction ?e . ?e rdf:type ontology:state }
[]
state
Clarification for simple ques.
Q789889
SYSTEM
Did you mean Ministry of Foreign Affairs ?
Q1192838 Q789889 Q4313368
(Q1192838,P1001,c(Q7275)) (Q789889,P1001,c(Q7275)) (Q4313368,P1001,c(Q7275))
[ANSWER]
['Q1192838', 'P1001', {'concept': 'Q7275'}] ['Q789889', 'P1001', {'concept': 'Q7275'}] ['Q4313368', 'P1001', {'concept': 'Q7275'}]
SELECT DISTINCT ?e WHERE { resource:Q4313368 property:P1001 ?e . ?e rdf:type ontology:Q7275 }
Ministry of Internal Affairs Ministry of Foreign Affairs Ministry of Justice
Did you mean Ministry of Foreign Affairs ?
Ministry of Foreign Affairs
['Ministry of Internal Affairs', 'applies to jurisdiction', {'concept': 'state'}] ['Ministry of Foreign Affairs', 'applies to jurisdiction', {'concept': 'state'}] ['Ministry of Justice', 'applies to jurisdiction', {'concept': 'state'}]
SELECT DISTINCT ?e WHERE { resource:Ministry_of_Justice property:applies_to_jurisdiction ?e . ?e rdf:type ontology:state }
[]
Simple Question (Coreferenced)
USER
No, I meant Ministry of Justice. Could you tell me the answer for that?
(Q4313368,P1001,c(Q7275))
Q4313368
['Q4313368', 'P1001', {'concept': 'Q7275'}]
['Ministry of Justice', 'applies to jurisdiction', {'concept': 'state'}]
[]
Q15180
SYSTEM
Soviet Union
Q15180
(Q4313368,P1001,c(Q7275))
action filter_type
action find
entity Q4313368
relation P1001
type Q7275
The [ANSWER] comes under the supervision of that ministry
['Q4313368', 'P1001', {'concept': 'Q7275'}]
SELECT DISTINCT ?e WHERE { resource:Q4313368 property:P1001 ?e . ?e rdf:type ontology:Q7275 }
Soviet Union
The Soviet Union comes under the supervision of that ministry
Soviet Union
action filter_type
action find
entity Ministry of Justice
relation applies to jurisdiction
type state
['Ministry of Justice', 'applies to jurisdiction', {'concept': 'state'}]
SELECT DISTINCT ?e WHERE { resource:Ministry_of_Justice property:applies_to_jurisdiction ?e . ?e rdf:type ontology:state }
[]
Verification (Boolean) (All)
Verification|3 entities, 2 direct, 2(direct) are query entities, subject is indirect
Q15180 Q315518 Q5077978
P6
Q502895
USER
Does that state have Nikolai Tikhonov and Charles Garth as its administrative leader ?
(Q15180,P6,Q315518) (Q15180,P6,Q5077978)
action is_in
entity Q15180
action intersection
action find_reverse
entity Q315518
relation P6
action find_reverse
entity Q5077978
relation P6
['Q15180', 'P6', 'Q315518'] ['Q15180', 'P6', 'Q5077978']
ASK WHERE { resource:Q15180 property:P6 resource:Q315518 . resource:Q15180 property:P6 resource:Q5077978 }
Soviet Union Nikolai Tikhonov Charles Garth
action is_in
entity Soviet Union
action intersection
action find_reverse
entity Nikolai Tikhonov
relation head of government
action find_reverse
entity Charles Garth
relation head of government
['Soviet Union', 'head of government', 'Nikolai Tikhonov'] ['Soviet Union', 'head of government', 'Charles Garth']
ASK WHERE { resource:Soviet_Union property:head_of_government resource:Nikolai_Tikhonov . resource:Soviet_Union property:head_of_government resource:Charles_Garth }
[]
common name
SYSTEM
YES and NO respectively
(Q15180,P6,Q315518) (Q15180,P6,Q5077978)
action is_in
entity Q15180
action intersection
action find_reverse
entity Q315518
relation P6
action find_reverse
entity Q5077978
relation P6
[ANSWER]
['Q15180', 'P6', 'Q315518'] ['Q15180', 'P6', 'Q5077978']
ASK WHERE { resource:Q15180 property:P6 resource:Q315518 . resource:Q15180 property:P6 resource:Q5077978 }
YES and NO respectively
action is_in
entity Soviet Union
action intersection
action find_reverse
entity Nikolai Tikhonov
relation head of government
action find_reverse
entity Charles Garth
relation head of government
['Soviet Union', 'head of government', 'Nikolai Tikhonov'] ['Soviet Union', 'head of government', 'Charles Garth']
ASK WHERE { resource:Soviet_Union property:head_of_government resource:Nikolai_Tikhonov . resource:Soviet_Union property:head_of_government resource:Charles_Garth }
[]
Logical Reasoning (All)
Logical|Intersection|Multiple_Relation
Q6581097 Q789889
P21 P108
Q502895
USER
Which people have Ministry of Foreign Affairs as their employer and have the gender as male ?
AND((c(Q502895),P108,Q789889), (c(Q502895),P21,Q6581097))
action filter_type
action intersection
action find_reverse
entity Q789889
relation P108
action find_reverse
entity Q6581097
relation P21
type Q502895
{'AND': [[{'concept': 'Q502895'}, 'P108', 'Q789889'], [{'concept': 'Q502895'}, 'P21', 'Q6581097']]}
SELECT DISTINCT ?l WHERE { ?l property:P108 resource:Q789889 . ?l property:P21 resource:Q6581097 . ?l rdf:type ontology:Q502895 }
male Ministry of Foreign Affairs
action filter_type
action intersection
action find_reverse
entity Ministry of Foreign Affairs
relation employer
action find_reverse
entity male
relation gender
type common name
{'AND': [[{'concept': 'common name'}, 'employer', 'Ministry of Foreign Affairs'], [{'concept': 'common name'}, 'gender', 'male']]}
SELECT DISTINCT ?l WHERE { ?l property:employer resource:Ministry_of_Foreign_Affairs . ?l property:gender resource:male . ?l rdf:type ontology:common_name }
[]
common name
Q440393 Q58217
SYSTEM
Vladimir Grinin, Sergey Lavrov
Q440393 Q58217
AND((c(Q502895),P108,Q789889), (c(Q502895),P21,Q6581097))
action filter_type
action intersection
action find_reverse
entity Q789889
relation P108
action find_reverse
entity Q6581097
relation P21
type Q502895
[ANSWERS] have Ministry of Foreign Affairs as their employer and have the gender as male
{'AND': [[{'concept': 'Q502895'}, 'P108', 'Q789889'], [{'concept': 'Q502895'}, 'P21', 'Q6581097']]}
SELECT DISTINCT ?l WHERE { ?l property:P108 resource:Q789889 . ?l property:P21 resource:Q6581097 . ?l rdf:type ontology:Q502895 }
Vladimir Grinin Sergey Lavrov
Vladimir Grinin and Sergey Lavrov have Ministry of Foreign Affairs as their employer and have the gender as male
Vladimir Grinin Sergey Lavrov
action filter_type
action intersection
action find_reverse
entity Ministry of Foreign Affairs
relation employer
action find_reverse
entity male
relation gender
type common name
{'AND': [[{'concept': 'common name'}, 'employer', 'Ministry of Foreign Affairs'], [{'concept': 'common name'}, 'gender', 'male']]}
SELECT DISTINCT ?l WHERE { ?l property:employer resource:Ministry_of_Foreign_Affairs . ?l property:gender resource:male . ?l rdf:type ontology:common_name }
[]
Comparative Reasoning (All)
Comparative|More/Less|Mult. entity type
Q320925
P1376
Q7275 Q20667921 Q515
USER
Which states have approximately the same number of french administrative divisions and cities as their capital as Shu Han ?
(c(Q20667921)|c(Q515),P1376,c(Q7275))
action approx
action union
action find_reverse_tuple_counts
relation P1376
type Q7275
type Q20667921
action find_reverse_tuple_counts
relation P1376
type Q7275
type Q515
action count
action filter_multi_types
action find_reverse
entity Q320925
relation P1376
type Q20667921
type Q515
[[{'concept': 'Q20667921'}, {'concept': 'Q515'}], 'P1376', {'concept': 'Q7275'}]
SELECT DISTINCT ?p WHERE { { SELECT DISTINCT ( COUNT ( ?a ) AS ?q ) ?p WHERE { { ?p rdf:type ontology:Q7275 . ?a rdf:type ontology:Q20667921 . ?a property:P1376 ?p } UNION { ?a property:P1376 ?p . ?p rdf:type ontology:Q7275 . ?a rdf:type ontology:Q515 } } GROUP BY ?p } . { SELECT DISTINCT ( COUNT ( ?u ) AS ?e ) WHERE { ?u property:P1376 resource:Q320925 . { ?u rdf:type ?z . VALUES ( ?z ) { ( ontology:Q20667921 ) ( ontology:Q515 ) } } } } . FILTER ( ?q = ?e ) }
Shu Han
action approx
action union
action find_reverse_tuple_counts
relation capital of
type state
type type of french administrative division
action find_reverse_tuple_counts
relation capital of
type state
type city
action count
action filter_multi_types
action find_reverse
entity Shu Han
relation capital of
type type of french administrative division
type city
[[{'concept': 'type of french administrative division'}, {'concept': 'city'}], 'capital of', {'concept': 'state'}]
SELECT DISTINCT ?p WHERE { { SELECT DISTINCT ( COUNT ( ?a ) AS ?q ) ?p WHERE { { ?p rdf:type ontology:state . ?a rdf:type ontology:type_of_french_administrative_division . ?a property:capital_of ?p } UNION { ?a property:capital_of ?p . ?p rdf:type ontology:state . ?a rdf:type ontology:city } } GROUP BY ?p } . { SELECT DISTINCT ( COUNT ( ?u ) AS ?e ) WHERE { ?u property:capital_of resource:Shu_Han . { ?u rdf:type ?z . VALUES ( ?z ) { ( ontology:type_of_french_administrative_division ) ( ontology:city ) } } } } . FILTER ( ?q = ?e ) }
[]
state type of french administrative division city
Q33946 Q15180 Q980
SYSTEM
Czechoslovakia, Soviet Union, Bavaria
Q230791 Q1193822 Q46652 Q7559152 Q568523 Q788071 Q207162 Q572222 Q1275158 Q152855 Q174193 Q466581 Q110888 Q1471995 Q1295806 Q975405 Q1688151 Q457167 Q1483643 Q827040 Q797527 Q190513 Q889374 Q2308237 Q486181 Q775550 Q31454 Q834486 Q2006542 Q186096 Q501684 Q164079 Q1649871 Q588672 Q2564694 Q62623 Q171150 Q282475 Q1789596 Q184536 Q523380 Q980 Q746443 Q252580 Q3446210 Q317078 Q332005 Q874954 Q172579 Q867782 Q798431 Q1269910 Q188553 Q536476 Q877875 Q1068408 Q1150344 Q330362 Q8146595 Q267584 Q310293 Q1362278 Q1269234 Q2361927 Q1067513 Q402145 Q255931 Q2342822 Q863279 Q1468426 Q71092 Q3177715 Q15180 Q800236 Q83821 Q27260 Q249578 Q16410 Q953432 Q215643 Q212278 Q223936 Q8735 Q13107370 Q8733 Q156038 Q7405 Q761370 Q208404 Q467627 Q1796239 Q321371 Q1152445 Q2670639 Q2412900 Q190025 Q229411 Q153660 Q1771831 Q1069905 Q105313 Q44642 Q38872 Q107299 Q546282 Q11876909 Q541455 Q216173 Q646374 Q241748 Q577867 Q210163 Q842931 Q858841 Q427703 Q2301372 Q216632 Q202687 Q207272 Q889394 Q151148 Q1796198 Q2419932 Q2668600 Q273025 Q149747 Q27306 Q1123960 Q617218 Q1132786 Q167360 Q1186434 Q954585 Q150069 Q1811029 Q551375 Q762943 Q1998866 Q106577 Q146246 Q473433 Q651377 Q161885 Q526507 Q191077 Q468814 Q174306 Q16957 Q1617495 Q1194765 Q157367 Q28322 Q760893 Q1539360 Q2305208 Q1152126 Q652560 Q1639475 Q1636212 Q503623 Q124943 Q1311219 Q172107 Q12548 Q25227 Q870517 Q19901436 Q623751 Q726798 Q736936 Q2444884 Q28428 Q1479952 Q303421 Q449639 Q1143524 Q2086556 Q26988 Q16949002 Q1923401 Q42585 Q170468 Q600018 Q323904 Q1117051 Q1135255 Q1477220 Q624887 Q269864 Q199841 Q335088 Q325461 Q583038 Q199442 Q860407 Q13706 Q146761 Q200262 Q1296908 Q156020 Q431575 Q769782 Q497777 Q878319 Q7251405 Q582861 Q206411 Q179293 Q26472 Q158725 Q139315 Q26273 Q139319 Q832554 Q870055 Q3271735 Q160440 Q797422 Q235030 Q211853 Q213638 Q2340665 Q1538311 Q2657134 Q2414171 Q218023 Q2162698 Q1077630 Q1149230 Q324470 Q551067 Q2264735 Q28511 Q796583 Q1136259 Q28456 Q1183649 Q209065 Q21203 Q10988528 Q631210 Q402580 Q2086608 Q733799 Q178913 Q131964 Q83274 Q62589 Q83572 Q4948 Q836169 Q234009 Q28208 Q903779 Q55502 Q1319681 Q713750 Q2552742 Q220167 Q1115291 Q147909 Q319881 Q1709185 Q894030 Q37024 Q62519 Q668294 Q83286 Q210036 Q3755547 Q1255614 Q76048 Q914898 Q181254 Q2396442 Q28025 Q142417 Q11704201 Q2428714 Q49326 Q1406298 Q14934927 Q1057118 Q2088324 Q11909456 Q580188 Q170174 Q699871 Q175276 Q177076 Q7318 Q844910 Q248452 Q552157 Q170770 Q30623 Q225890 Q5157575 Q3456373 Q217196 Q16624774 Q154195 Q266923 Q173082 Q285658 Q150061 Q170588 Q165154 Q70972 Q187684 Q1143164 Q1324889 Q1164500 Q161036 Q2314907 Q2184 Q774783 Q994451 Q105092 Q3185305 Q178038 Q1148907 Q179876 Q206279 Q1469100 Q25279 Q1078602 Q48685 Q2378381 Q320925 Q202775 Q1471373 Q374521 Q491507 Q1044536 Q1333032 Q940741 Q289577 Q2593459 Q150058 Q571453 Q4461035 Q33946 Q762084 Q271570 Q2579852 Q107380 Q206696 Q544630 Q180114 Q431731 Q36704 Q1198071 Q889884 Q698239 Q1142179 Q4453003 Q4453007 Q829356 Q1062422 Q764697 Q853477 Q169705 Q212439 Q1751495 Q738264 Q386496 Q696241 Q152420 Q11774 Q4843701 Q422065 Q76236 Q209857 Q2712121 Q964024 Q877155 Q777981 Q487829 Q2365048 Q4274522 Q154853 Q1148042 Q770776 Q230407 Q1549254 Q49683 Q7314513 Q75613 Q1192936 Q2109946 Q71747 Q676184 Q128938 Q837136 Q146597 Q1072362 Q680997 Q93180 Q28573 Q949268 Q1986139 Q151536 Q188586 Q211274 Q61292 Q6412664 Q671899 Q7314469 Q80211 Q12490507 Q862304 Q1029847 Q6415938 Q5148517 Q41304
(c(Q20667921)|c(Q515),P1376,c(Q7275))
action approx
action union
action find_reverse_tuple_counts
relation P1376
type Q7275
type Q20667921
action find_reverse_tuple_counts
relation P1376
type Q7275
type Q515
action count
action filter_multi_types
action find_reverse
entity Q320925
relation P1376
type Q20667921
type Q515
[ANSWERS] have approximately the same number of french administrative divisions and cities as their capital as Shu Han
[[{'concept': 'Q20667921'}, {'concept': 'Q515'}], 'P1376', {'concept': 'Q7275'}]
SELECT DISTINCT ?p WHERE { { SELECT DISTINCT ( COUNT ( ?a ) AS ?q ) ?p WHERE { { ?p rdf:type ontology:Q7275 . ?a rdf:type ontology:Q20667921 . ?a property:P1376 ?p } UNION { ?a property:P1376 ?p . ?p rdf:type ontology:Q7275 . ?a rdf:type ontology:Q515 } } GROUP BY ?p } . { SELECT DISTINCT ( COUNT ( ?u ) AS ?e ) WHERE { ?u property:P1376 resource:Q320925 . { ?u rdf:type ?z . VALUES ( ?z ) { ( ontology:Q20667921 ) ( ontology:Q515 ) } } } } . FILTER ( ?q = ?e ) }
Kingdom of Scotland Wuyue Malacca sultanate Somali Republic Nobatia Talysh-Mughan Autonomous Republic Bourbon Restoration County of Horne Elymais Kingdom of Tungning United Kingdom of Great Britain and Ireland Hoysala Empire Kingdom of Essex Former Qin Lower Yafa Sultanate of Rum Kingdom of Thomond West Ukrainian People's Republic Nakhon Si Thammarat Kingdom Nanyue British Togoland Khanate of Sibir Warsangali Sultanate Ahom kingdom Samanid dynasty Adamawa Emirate Kingdom of Libya Federation of South Arabia Dominion of Pakistan Tsardom of Russia Kingdom of Gomma Kingdom of Hanover Kingdom of Poland Hammadid dynasty Powys Fadog Kalmar Union Kingdom of Hungary Kingdom of Kartli-Kakheti Croatia in personal union with Hungary Mali Empire Republic of Central Lithuania Bavaria Golden Ambrosian Republic Duchy of Modena and Reggio Kingdom of Pamplona Pskov Republic Principality of Achaea Principality of Theodoro Kingdom of Italy Kingdom of Funan Republic of Dahomey Republic of Madawaska Batavian Republic Toucouleur Empire Palmyrene Empire Kuru Kingdom Johor Sultanate Commonwealth of England Upingtonia Yemen Arab Republic Saar Protectorate United States of Stellaland Stellaland Duchy of Masovia Injuids Mataram Sultanate Hariphunchai West Pakistan Sukhothai Kingdom Limmu-Ennarea Second French Empire Pagaruyung Kingdom Soviet Union Bahawalpur State Bijapur Sultanate Samma dynasty Ghaznavid Empire People's Republic of Hungary Couto Misto Indo-Greek Kingdom Kingdom of Holland Kingdom of Italy Medes Principality of Serbia Qing dynasty Duchy of Courland and Semigallia Sui dynasty Aro Confederacy Kingdom of Armenia Durrani Empire Kingdom of Seville Bosporan Kingdom Aerican Empire Powys Wenwynwyn Republic of Salé Federal Republic of Central America Delhi Sultanate Italian Social Republic Kruševo Republic Cheng Han Kingdom of Wessex Federation of Arab Republics Prussia Kingdom of Northumbria Xia State of Brazil Anglo-Egyptian Sudan Free City of Danzig French India Kingdom of Serbia Kingdom of Poland Astrakhan Khanate East Pakistan Kingdom of Croatia Free State of Schaumburg-Lippe Kingdom of Toledo Mali Federation Songhai Empire Second Polish Republic Portuguese Mozambique Chola dynasty Kingdom of Córdoba Kingdom of Redonda Taifa of Niebla Gallic Empire Adiabene Kingdom of Prussia Conch Republic Yamhad Ouaddai Empire First Portuguese Republic Muang Phuan Kingdom of Brycheiniog United Suvadive Republic Finnish Socialist Workers' Republic Grand Duchy of Westarctica County of Holland Czech and Slovak Federal Republic Neustria Francia Ammon Shunga Empire Kingdom of Great Britain Later Shu Kingdom of Yugoslavia Dahomey Republic of Genoa East Germany Kingdom of Jaén Kamarupa Brandenburg-Prussia Balhae Jolof Empire Northern Liang Soviet Russia People's Republic of the Congo West Indies Federation Mountainous Republic of the Northern Caucasus Karabakh Khanate Gold Coast Kingdom of Egypt Jaffna kingdom Polish–Lithuanian Commonwealth Holy Roman Empire Netherlands Antilles Odrysian kingdom Suriname Kingdom of Bernicia Tulunids Lu Tibet Baekje Kadamba Dynasty Kingdom of Galicia Alodia Northern Qi Kakatiya dynasty Cook Islands Lordship of Brecknock Zunghar Khanate Kingdom of Bohemia United Arab Republic Kingdom of Hungary Portuguese India Kingdom of Illyria Chinese Soviet Republic Somali Democratic Republic Neo-Babylonian Empire Socialist Republic of Serbia South Yemen Armenian Kingdom of Cilicia Kingdom of Thessalonica Ostrogothic Kingdom Kingdom of Aragon Kahlur State Principality of Sealand Hatay State Kingdom of Navarre Kathiri State of the Teutonic Order Idrisid dynasty Kingdom of Powys First Spanish Republic Serbian Despotate Protectorate of Peru Marinid dynasty Democratic Republic of Azerbaijan Kingdom of Castile Kingdom of Dali Tanganyika Territory Dʿmt Sint Maarten Russian Republic Argentine Confederation Kingdom of Laos Kingdom of Arles Crimean Khanate Republic of Upper Volta Principality of Antioch Republic of Serbian Krajina Kingdom of Cyprus Basutoland Travancore-Cochin Kingdom of Albania First Brazilian Republic Orange Free State Duchy of Bohemia Septinsular Republic Western Yan Kara Koyunlu Northern Zhou Arthedain Buyeo kingdom Kingdom of Kongo Southwestern Somalia Silla Deccan sultanates Kingdom of Greece Aruba Second East Turkestan Republic Nogai Horde Medang Kingdom Western Satraps Kingdom of the Hwicce empire of Trebizond Austrian Empire Hatay Union between Sweden and Norway Sikh Empire Republic of Venice Qasim Khanate Magadha Goryeo United Kingdom of Portugal, Brazil and the Algarves Kingdom of Jerusalem Qi West Germany Northland State Lydenburg Republic Thonburi Kingdom Kingdom of Bulgaria Republic of Taiwan Kingdom of Spain under Joseph Bonaparte Bornu Empire Serbia and Montenegro Finnish Democratic Republic Kamerun Socialist Federal Republic of Yugoslavia Chechen Republic of Ichkeria Kingdom of Italy Indo-Parthian Kingdom Congo Free State Kingdom of Khotan Empire of Nicea Kingdom of Galicia and Lodomeria Ryukyu Kingdom Kingdom of Valencia Taifa of Arjona Sena dynasty Majapahit Serbian Empire Murrawarri Republic Chenla Kingdom Colonial Brazil Bit Agusi Mutawakkilite Kingdom of Yemen Papal States Taebong Kingdom of León Caucasian Albania Nazi Germany Pandyan Dynasty British North America Nieuwe Republiek Grand Duchy of Moscow Manchukuo Kingdom of Strathclyde Griqualand East Republic of Brescia Crown of Castile Kingdom of Nicoya Kingdom of Bavaria Kingdom of Mysore Dacia First Mexican Empire Republic of Ararat Republic of Texas Kingdom of Sardinia Kingdom of France Despotate of Epirus Western Wei Germiyanids Kingdom of Murcia Free State of Prussia Later Zhao Russian Soviet Federative Socialist Republic Sovereign Principality of the United Netherlands Western Liang Kingdom of Mercia Kingdom of Israel Second Spanish Republic State of Katanga Kingdom of England Waalo Karamanids Curaçao Kingdom of Nepal Judah State of Aden Shu Han Qu'aiti Saloum Bahmani Sultanate Egypt Eyalet Spain under the Restoration Elmet Republic of Hungary Himyarite Kingdom Provisional Government of Hawaii Travancore Former Shu Akkadian empire Czechoslovakia Bamana Empire Kingdom of Araucanía and Patagonia Taurida Soviet Socialist Republic History of Lippe Helvetic Republic Republic of Maryland Ayyubid dynasty Tanganyika Yugoslavia Southern Han Kingdom of Rwanda Hubaekje Orange River Colony Tashkent State Tashkent Khanate Kingdom of Makuria Konbaung Dynasty Taifa of Orihuela Lan Xang Xia dynasty Cossack Hetmanate Slovak Socialist Republic Los Altos, Central America Kingdom of Montenegro Khanate of Kokand Guelders Gupta Empire Libyan Arab Jamahiriya Sultanate of Sulu Lithuanian–Belorussian Soviet Socialist Republic Kingdom of Lombardy–Venetia Republic of Connaught Moldavian Democratic Republic Chera Dynasty Duchy of the Archipelago Chagatai Khanate Adal Sultanate Tyrconnell Diauehi Qutb Shahi dynasty Dutch Gold Coast Kingdom of Israel Principality of Seborga Grand Duchy of Lithuania Republic of South Carolina Almoravid dynasty Kingdom of Burundi Principality of Galilee Duchy of Brittany Kingdom of Sussex Shang dynasty Kingdom of Deheubarth Zand dynasty Provisional Revolutionary Government of the Republic of South Vietnam Principality of Lower Pannonia Seleucid Empire Inca Nanda Empire Parthian Empire Novgorod Republic Kingdom of Sicily People's Republic of Poland Far Eastern Republic Realm of Stefan Dragutin Duchy of Teschen Republic of Georgia Lithuanian Soviet Socialist Republic Rashidun Caliphate Kara-Khitan Khanate Natalia Republic Emirate of Dhala Colony and Protectorate of Nigeria Weimar Republic
Czechoslovakia, Soviet Union and Bavaria have approximately the same number of french administrative divisions and cities as their capital as Shu Han
Czechoslovakia Soviet Union Bavaria
action approx
action union
action find_reverse_tuple_counts
relation capital of
type state
type type of french administrative division
action find_reverse_tuple_counts
relation capital of
type state
type city
action count
action filter_multi_types
action find_reverse
entity Shu Han
relation capital of
type type of french administrative division
type city
[[{'concept': 'type of french administrative division'}, {'concept': 'city'}], 'capital of', {'concept': 'state'}]
SELECT DISTINCT ?p WHERE { { SELECT DISTINCT ( COUNT ( ?a ) AS ?q ) ?p WHERE { { ?p rdf:type ontology:state . ?a rdf:type ontology:type_of_french_administrative_division . ?a property:capital_of ?p } UNION { ?a property:capital_of ?p . ?p rdf:type ontology:state . ?a rdf:type ontology:city } } GROUP BY ?p } . { SELECT DISTINCT ( COUNT ( ?u ) AS ?e ) WHERE { ?u property:capital_of resource:Shu_Han . { ?u rdf:type ?z . VALUES ( ?z ) { ( ontology:type_of_french_administrative_division ) ( ontology:city ) } } } } . FILTER ( ?q = ?e ) }
[]
Clarification
Simple Question|Single Entity|Indirect
Q33946
P17
Q7275
USER
Which state is that one situated in ?
(Q33946,P17,c(Q7275))
action filter_type
action find
entity Q33946
relation P17
type Q7275
['Q33946', 'P17', {'concept': 'Q7275'}]
SELECT DISTINCT ?i WHERE { resource:Q33946 property:P17 ?i . ?i rdf:type ontology:Q7275 }
Czechoslovakia
action filter_type
action find
entity Czechoslovakia
relation country
type state
['Czechoslovakia', 'country', {'concept': 'state'}]
SELECT DISTINCT ?i WHERE { resource:Czechoslovakia property:country ?i . ?i rdf:type ontology:state }
[]
state
Clarification for simple ques.
Q980
SYSTEM
Did you mean Bavaria ?
Q33946 Q15180 Q980
(Q33946,P17,c(Q7275)) (Q15180,P17,c(Q7275)) (Q980,P17,c(Q7275))
[ANSWER]
['Q33946', 'P17', {'concept': 'Q7275'}] ['Q15180', 'P17', {'concept': 'Q7275'}] ['Q980', 'P17', {'concept': 'Q7275'}]
SELECT DISTINCT ?i WHERE { resource:Q33946 property:P17 ?i . ?i rdf:type ontology:Q7275 }
Czechoslovakia Soviet Union Bavaria
Did you mean Bavaria ?
Bavaria
['Czechoslovakia', 'country', {'concept': 'state'}] ['Soviet Union', 'country', {'concept': 'state'}] ['Bavaria', 'country', {'concept': 'state'}]
SELECT DISTINCT ?i WHERE { resource:Czechoslovakia property:country ?i . ?i rdf:type ontology:state }
[]
Simple Question (Coreferenced)
USER
No, I meant Czechoslovakia. Could you tell me the answer for that?
(Q33946,P17,c(Q7275))
Q33946
['Q33946', 'P17', {'concept': 'Q7275'}]
['Czechoslovakia', 'country', {'concept': 'state'}]
[]
Q33946
SYSTEM
Czechoslovakia
Q33946
(Q33946,P17,c(Q7275))
action filter_type
action find
entity Q33946
relation P17
type Q7275
That one is situated in [ANSWER]
['Q33946', 'P17', {'concept': 'Q7275'}]
SELECT DISTINCT ?i WHERE { resource:Q33946 property:P17 ?i . ?i rdf:type ontology:Q7275 }
Czechoslovakia
That one is situated in Czechoslovakia
Czechoslovakia
action filter_type
action find
entity Czechoslovakia
relation country
type state
['Czechoslovakia', 'country', {'concept': 'state'}]
SELECT DISTINCT ?i WHERE { resource:Czechoslovakia property:country ?i . ?i rdf:type ontology:state }
[]
Comparative Reasoning (Count) (All)
Comparative|Count over More/Less|Mult. entity type
Q259039
P417
Q1445650 Q502895 Q56061
USER
How many administrative territories are greater number of holidays or people a patron saint of than Giardinello ?
(c(Q56061),P417,c(Q1445650)|c(Q502895))
action count
action greater
action union
action find_tuple_counts
relation P417
type Q56061
type Q1445650
action find_tuple_counts
relation P417
type Q56061
type Q502895
action count
action filter_multi_types
action find
entity Q259039
relation P417
type Q1445650
type Q502895
[{'concept': 'Q56061'}, 'P417', [{'concept': 'Q1445650'}, {'concept': 'Q502895'}]]
SELECT DISTINCT ( COUNT ( ?b ) AS ?e ) WHERE { { SELECT DISTINCT ( COUNT ( ?a ) AS ?p ) ?b WHERE { VALUES ( ?q ) { ( ontology:Q1445650 ) ( ontology:Q502895 ) } . ?a rdf:type ?q } GROUP BY ?b } . { SELECT DISTINCT ( COUNT ( ?c ) AS ?m ) WHERE { resource:Q259039 property:P417 ?c . { { ?c rdf:type ontology:Q502895 } UNION { ?c rdf:type ontology:Q1445650 } } } } . FILTER ( ?p > ?m ) }
Giardinello
action count
action greater
action union
action find_tuple_counts
relation patron saint
type administrative territorial entity
type holiday
action find_tuple_counts
relation patron saint
type administrative territorial entity
type common name
action count
action filter_multi_types
action find
entity Giardinello
relation patron saint
type holiday
type common name
[{'concept': 'administrative territorial entity'}, 'patron saint', [{'concept': 'holiday'}, {'concept': 'common name'}]]
SELECT DISTINCT ( COUNT ( ?b ) AS ?e ) WHERE { { SELECT DISTINCT ( COUNT ( ?a ) AS ?p ) ?b WHERE { VALUES ( ?q ) { ( ontology:holiday ) ( ontology:common_name ) } . ?a rdf:type ?q } GROUP BY ?b } . { SELECT DISTINCT ( COUNT ( ?c ) AS ?m ) WHERE { resource:Giardinello property:patron_saint ?c . { { ?c rdf:type ontology:common_name } UNION { ?c rdf:type ontology:holiday } } } } . FILTER ( ?p > ?m ) }
[]
holiday common name administrative territorial entity
SYSTEM
97
Q5818 Q187352 Q11974 Q40801 Q212841 Q454875 Q14209773 Q34111 Q81004 Q6737 Q13364 Q46844 Q73450 Q15468 Q490 Q41329 Q495 Q2044 Q1492 Q2028 Q929022 Q641 Q46165 Q649 Q58463 Q491588 Q3395964 Q73489 Q53825 Q200908 Q15090 Q36647 Q13375 Q15088 Q10305 Q53265 Q6340 Q101229 Q50135 Q2090 Q695550 Q53850 Q6285 Q9920 Q6046 Q3739344 Q2807 Q72279 Q133123 Q139595 Q3415 Q39519 Q495798 Q82208 Q3557616 Q374108 Q3562704 Q428018 Q220 Q90 Q431389 Q5991813 Q380189 Q617 Q470461 Q733574 Q932648 Q100143 Q100065 Q13121 Q465078 Q3947670 Q100772 Q71935 Q51400 Q504216 Q51315 Q210470 Q11959 Q52215 Q15095 Q3740507 Q2634 Q51929 Q8356 Q47281 Q58581 Q119066 Q1155 Q200036 Q15487 Q244207 Q1957 Q50074 Q1897 Q433066 Q46864
(c(Q56061),P417,c(Q1445650)|c(Q502895))
action count
action greater
action union
action find_tuple_counts
relation P417
type Q56061
type Q1445650
action find_tuple_counts
relation P417
type Q56061
type Q502895
action count
action filter_multi_types
action find
entity Q259039
relation P417
type Q1445650
type Q502895
[ANSWER]
[{'concept': 'Q56061'}, 'P417', [{'concept': 'Q1445650'}, {'concept': 'Q502895'}]]
SELECT DISTINCT ( COUNT ( ?b ) AS ?e ) WHERE { { SELECT DISTINCT ( COUNT ( ?a ) AS ?p ) ?b WHERE { VALUES ( ?q ) { ( ontology:Q1445650 ) ( ontology:Q502895 ) } . ?a rdf:type ?q } GROUP BY ?b } . { SELECT DISTINCT ( COUNT ( ?c ) AS ?m ) WHERE { resource:Q259039 property:P417 ?c . { { ?c rdf:type ontology:Q502895 } UNION { ?c rdf:type ontology:Q1445650 } } } } . FILTER ( ?p > ?m ) }
Córdoba Kavala Las Palmas de Gran Canaria Borca di Cadore Drama Amarante Municipality San Lorenzo de' Picenardi Pozzallo Laviano Castellammare di Stabia Ravenna Roana Caldarola Badalona Milan Linz Turin Florence Barcelona Verona Giannitsa Venice Montecchio Maggiore Moscow Cancello e Arnone Camporeale Koufalia Camerino Altilia Rethymno Lleida Cork Pisa Tarragona Zaragoza Gemona del Friuli Castel Giorgio Martinengo Rocca di Cambio Nuremberg Huécija Cariati Varese Haarlem Novara Neokaisareia Madrid Mugnano di Napoli Patras Zacharo Ancona Brinzio Brolo Kastritsa Platres Altrei Molista Mölten Rome Paris Welsberg-Taisten Mansilla del Páramo Toblach Padua Amfilochia Istiaia Didymoteicho Caprino Bergamasco Mirandola Aalst Astorga San Mauro Mare Busseto Casamarciano Spoltore St. Martin in Passeier Villamagna Katerini Alicante Tuglie Albacete Favrio Naples Ischitella Valladolid Jesolo Curti, Campania Latera Busto Arsizio Volos Berga Campione d'Italia Vologda Castellafiume Cagliari Moos in Passeier Arcugnano
97
action count
action greater
action union
action find_tuple_counts
relation patron saint
type administrative territorial entity
type holiday
action find_tuple_counts
relation patron saint
type administrative territorial entity
type common name
action count
action filter_multi_types
action find
entity Giardinello
relation patron saint
type holiday
type common name
[{'concept': 'administrative territorial entity'}, 'patron saint', [{'concept': 'holiday'}, {'concept': 'common name'}]]
SELECT DISTINCT ( COUNT ( ?b ) AS ?e ) WHERE { { SELECT DISTINCT ( COUNT ( ?a ) AS ?p ) ?b WHERE { VALUES ( ?q ) { ( ontology:holiday ) ( ontology:common_name ) } . ?a rdf:type ?q } GROUP BY ?b } . { SELECT DISTINCT ( COUNT ( ?c ) AS ?m ) WHERE { resource:Giardinello property:patron_saint ?c . { { ?c rdf:type ontology:common_name } UNION { ?c rdf:type ontology:holiday } } } } . FILTER ( ?p > ?m ) }
[]
Comparative Reasoning (Count) (All)
Comparative|Count over More/Less|Mult. entity type|Incomplete
Q2044
P417
Q1445650 Q502895 Q56061
USER
And what about Florence?
(c(Q56061),P417,c(Q1445650)|c(Q502895))
action count
action greater
action union
action find_tuple_counts
relation P417
type Q56061
type Q1445650
action find_tuple_counts
relation P417
type Q56061
type Q502895
action count
action filter_multi_types
action find
entity Q2044
relation P417
type Q1445650
type Q502895
[{'concept': 'Q56061'}, 'P417', [{'concept': 'Q1445650'}, {'concept': 'Q502895'}]]
SELECT DISTINCT ( COUNT ( ?k ) AS ?x ) WHERE { { SELECT DISTINCT ?k ( COUNT ( ?n ) AS ?e ) WHERE { VALUES ( ?g ) { ( ontology:Q1445650 ) ( ontology:Q502895 ) } . ?n rdf:type ?g } GROUP BY ?k } . { SELECT DISTINCT ( COUNT ( ?a ) AS ?y ) WHERE { resource:Q2044 property:P417 ?a . { { ?a rdf:type ontology:Q1445650 } UNION { ?a rdf:type ontology:Q502895 } } } } . FILTER ( ?e > ?y ) }
Florence
action count
action greater
action union
action find_tuple_counts
relation patron saint
type administrative territorial entity
type holiday
action find_tuple_counts
relation patron saint
type administrative territorial entity
type common name
action count
action filter_multi_types
action find
entity Florence
relation patron saint
type holiday
type common name
[{'concept': 'administrative territorial entity'}, 'patron saint', [{'concept': 'holiday'}, {'concept': 'common name'}]]
SELECT DISTINCT ( COUNT ( ?k ) AS ?x ) WHERE { { SELECT DISTINCT ?k ( COUNT ( ?n ) AS ?e ) WHERE { VALUES ( ?g ) { ( ontology:holiday ) ( ontology:common_name ) } . ?n rdf:type ?g } GROUP BY ?k } . { SELECT DISTINCT ( COUNT ( ?a ) AS ?y ) WHERE { resource:Florence property:patron_saint ?a . { { ?a rdf:type ontology:holiday } UNION { ?a rdf:type ontology:common_name } } } } . FILTER ( ?e > ?y ) }
[]
holiday common name administrative territorial entity
SYSTEM
2
Q39519 Q220
(c(Q56061),P417,c(Q1445650)|c(Q502895))
action count
action greater
action union
action find_tuple_counts
relation P417
type Q56061
type Q1445650
action find_tuple_counts
relation P417
type Q56061
type Q502895
action count
action filter_multi_types
action find
entity Q2044
relation P417
type Q1445650
type Q502895
[ANSWER]
[{'concept': 'Q56061'}, 'P417', [{'concept': 'Q1445650'}, {'concept': 'Q502895'}]]
SELECT DISTINCT ( COUNT ( ?k ) AS ?x ) WHERE { { SELECT DISTINCT ?k ( COUNT ( ?n ) AS ?e ) WHERE { VALUES ( ?g ) { ( ontology:Q1445650 ) ( ontology:Q502895 ) } . ?n rdf:type ?g } GROUP BY ?k } . { SELECT DISTINCT ( COUNT ( ?a ) AS ?y ) WHERE { resource:Q2044 property:P417 ?a . { { ?a rdf:type ontology:Q1445650 } UNION { ?a rdf:type ontology:Q502895 } } } } . FILTER ( ?e > ?y ) }
Brinzio Rome
2
action count
action greater
action union
action find_tuple_counts
relation patron saint
type administrative territorial entity
type holiday
action find_tuple_counts
relation patron saint
type administrative territorial entity
type common name
action count
action filter_multi_types
action find
entity Florence
relation patron saint
type holiday
type common name
[{'concept': 'administrative territorial entity'}, 'patron saint', [{'concept': 'holiday'}, {'concept': 'common name'}]]
SELECT DISTINCT ( COUNT ( ?k ) AS ?x ) WHERE { { SELECT DISTINCT ?k ( COUNT ( ?n ) AS ?e ) WHERE { VALUES ( ?g ) { ( ontology:holiday ) ( ontology:common_name ) } . ?n rdf:type ?g } GROUP BY ?k } . { SELECT DISTINCT ( COUNT ( ?a ) AS ?y ) WHERE { resource:Florence property:patron_saint ?a . { { ?a rdf:type ontology:holiday } UNION { ?a rdf:type ontology:common_name } } } } . FILTER ( ?e > ?y ) }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P206
Q355304 Q15324 Q56061
USER
Which administrative territories are located next to max number of watercourses or bodies of water ?
(c(Q56061),P206,c(Q355304)|c(Q15324))
action argmax
action union
action find_tuple_counts
relation P206
type Q56061
type Q355304
action find_tuple_counts
relation P206
type Q56061
type Q15324
[{'concept': 'Q56061'}, 'P206', [{'concept': 'Q355304'}, {'concept': 'Q15324'}]]
SELECT DISTINCT ?w WHERE { { SELECT DISTINCT ?w ( COUNT ( ?y ) AS ?v ) WHERE { ?y rdf:type ?u . VALUES ( ?u ) { ( ontology:Q355304 ) ( ontology:Q15324 ) } } GROUP BY ?w } . FILTER ( ?v = ?l ) . { SELECT DISTINCT ( MAX ( ?r ) AS ?l ) { SELECT DISTINCT ?q ( COUNT ( ?s ) AS ?r ) WHERE { { ?q property:P206 ?s . ?q rdf:type ontology:Q56061 . ?s rdf:type ontology:Q355304 } UNION { ?q rdf:type ontology:Q56061 . ?s rdf:type ontology:Q15324 . ?q property:P206 ?s } } GROUP BY ?q } } }
action argmax
action union
action find_tuple_counts
relation located next to body of water
type administrative territorial entity
type watercourse
action find_tuple_counts
relation located next to body of water
type administrative territorial entity
type body of water
[{'concept': 'administrative territorial entity'}, 'located next to body of water', [{'concept': 'watercourse'}, {'concept': 'body of water'}]]
SELECT DISTINCT ?w WHERE { { SELECT DISTINCT ?w ( COUNT ( ?y ) AS ?v ) WHERE { ?y rdf:type ?u . VALUES ( ?u ) { ( ontology:watercourse ) ( ontology:body_of_water ) } } GROUP BY ?w } . FILTER ( ?v = ?l ) . { SELECT DISTINCT ( MAX ( ?r ) AS ?l ) { SELECT DISTINCT ?q ( COUNT ( ?s ) AS ?r ) WHERE { { ?q property:located_next_to_body_of_water ?s . ?q rdf:type ontology:administrative_territorial_entity . ?s rdf:type ontology:watercourse } UNION { ?q rdf:type ontology:administrative_territorial_entity . ?s rdf:type ontology:body_of_water . ?q property:located_next_to_body_of_water ?s } } GROUP BY ?q } } }
[]
watercourse body of water administrative territorial entity
Q60
SYSTEM
New York City
Q60
(c(Q56061),P206,c(Q355304)|c(Q15324))
action argmax
action union
action find_tuple_counts
relation P206
type Q56061
type Q355304
action find_tuple_counts
relation P206
type Q56061
type Q15324
[ANSWER] is located next to max number of watercourses or bodies of water
[{'concept': 'Q56061'}, 'P206', [{'concept': 'Q355304'}, {'concept': 'Q15324'}]]
SELECT DISTINCT ?w WHERE { { SELECT DISTINCT ?w ( COUNT ( ?y ) AS ?v ) WHERE { ?y rdf:type ?u . VALUES ( ?u ) { ( ontology:Q355304 ) ( ontology:Q15324 ) } } GROUP BY ?w } . FILTER ( ?v = ?l ) . { SELECT DISTINCT ( MAX ( ?r ) AS ?l ) { SELECT DISTINCT ?q ( COUNT ( ?s ) AS ?r ) WHERE { { ?q property:P206 ?s . ?q rdf:type ontology:Q56061 . ?s rdf:type ontology:Q355304 } UNION { ?q rdf:type ontology:Q56061 . ?s rdf:type ontology:Q15324 . ?q property:P206 ?s } } GROUP BY ?q } } }
New York City
New York City is located next to max number of watercourses or bodies of water
New York City
action argmax
action union
action find_tuple_counts
relation located next to body of water
type administrative territorial entity
type watercourse
action find_tuple_counts
relation located next to body of water
type administrative territorial entity
type body of water
[{'concept': 'administrative territorial entity'}, 'located next to body of water', [{'concept': 'watercourse'}, {'concept': 'body of water'}]]
SELECT DISTINCT ?w WHERE { { SELECT DISTINCT ?w ( COUNT ( ?y ) AS ?v ) WHERE { ?y rdf:type ?u . VALUES ( ?u ) { ( ontology:watercourse ) ( ontology:body_of_water ) } } GROUP BY ?w } . FILTER ( ?v = ?l ) . { SELECT DISTINCT ( MAX ( ?r ) AS ?l ) { SELECT DISTINCT ?q ( COUNT ( ?s ) AS ?r ) WHERE { { ?q property:located_next_to_body_of_water ?s . ?q rdf:type ontology:administrative_territorial_entity . ?s rdf:type ontology:watercourse } UNION { ?q rdf:type ontology:administrative_territorial_entity . ?s rdf:type ontology:body_of_water . ?q property:located_next_to_body_of_water ?s } } GROUP BY ?q } } }
[]