Simple Question (Direct)
Simple Question
Q3435376
P102
Q7210356
USER
Which party is Robert Hemmerdinger affiliated with ?
(Q3435376,P102,c(Q7210356))
action filter_type
action find
entity Q3435376
relation P102
type Q7210356
['Q3435376', 'P102', {'concept': 'Q7210356'}]
SELECT DISTINCT ?y WHERE { ?y rdf:type ontology:Q7210356 . resource:Q3435376 property:P102 ?y }
Robert Hemmerdinger
action filter_type
action find
entity Robert Hemmerdinger
relation member of political party
type political organization
['Robert Hemmerdinger', 'member of political party', {'concept': 'political organization'}]
SELECT DISTINCT ?y WHERE { ?y rdf:type ontology:political_organization . resource:Robert_Hemmerdinger property:member_of_political_party ?y }
[]
political organization
Q205150
SYSTEM
National Front
Q205150
(Q3435376,P102,c(Q7210356))
action filter_type
action find
entity Q3435376
relation P102
type Q7210356
Robert Hemmerdinger is affiliated with [ANSWER]
['Q3435376', 'P102', {'concept': 'Q7210356'}]
SELECT DISTINCT ?y WHERE { ?y rdf:type ontology:Q7210356 . resource:Q3435376 property:P102 ?y }
National Front
Robert Hemmerdinger is affiliated with National Front
National Front
action filter_type
action find
entity Robert Hemmerdinger
relation member of political party
type political organization
['Robert Hemmerdinger', 'member of political party', {'concept': 'political organization'}]
SELECT DISTINCT ?y WHERE { ?y rdf:type ontology:political_organization . resource:Robert_Hemmerdinger property:member_of_political_party ?y }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q205150
P488
Q502895
USER
Which people were the chairpersons of that political organization ?
(Q205150,P488,c(Q502895))
action filter_type
action find
entity Q205150
relation P488
type Q502895
['Q205150', 'P488', {'concept': 'Q502895'}]
SELECT DISTINCT ?j WHERE { resource:Q205150 property:P488 ?j . ?j rdf:type ontology:Q502895 }
National Front
action filter_type
action find
entity National Front
relation chairperson
type common name
['National Front', 'chairperson', {'concept': 'common name'}]
SELECT DISTINCT ?j WHERE { resource:National_Front property:chairperson ?j . ?j rdf:type ontology:common_name }
[]
common name
Q7177 Q12927
SYSTEM
Jean-Marie Le Pen, Marine Le Pen
Q7177 Q12927
(Q205150,P488,c(Q502895))
action filter_type
action find
entity Q205150
relation P488
type Q502895
[ANSWERS] were the chairpersons of that political organization
['Q205150', 'P488', {'concept': 'Q502895'}]
SELECT DISTINCT ?j WHERE { resource:Q205150 property:P488 ?j . ?j rdf:type ontology:Q502895 }
Jean-Marie Le Pen Marine Le Pen
Jean-Marie Le Pen and Marine Le Pen were the chairpersons of that political organization
Jean-Marie Le Pen Marine Le Pen
action filter_type
action find
entity National Front
relation chairperson
type common name
['National Front', 'chairperson', {'concept': 'common name'}]
SELECT DISTINCT ?j WHERE { resource:National_Front property:chairperson ?j . ?j rdf:type ontology:common_name }
[]
Logical Reasoning (All)
Logical|Union|Multiple_Relation
Q26495230 Q3435376
P27 P17
Q15617994
USER
Which administrative territories do Robert Hemmerdinger belong to or do Middle Farmhouse belong to ?
OR((Q3435376,P27,c(Q15617994)), (Q26495230,P17,c(Q15617994)))
action filter_type
action union
action find
entity Q3435376
relation P27
action find
entity Q26495230
relation P17
type Q15617994
{'OR': [['Q3435376', 'P27', {'concept': 'Q15617994'}], ['Q26495230', 'P17', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?b WHERE { ?b rdf:type ontology:Q15617994 . { { resource:Q3435376 property:P27 ?b } UNION { resource:Q26495230 property:P17 ?b } } }
Middle Farmhouse Robert Hemmerdinger
action filter_type
action union
action find
entity Robert Hemmerdinger
relation country of citizenship
action find
entity Middle Farmhouse
relation country
type designation for an administrative territorial entity
{'OR': [['Robert Hemmerdinger', 'country of citizenship', {'concept': 'designation for an administrative territorial entity'}], ['Middle Farmhouse', 'country', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?b WHERE { ?b rdf:type ontology:designation_for_an_administrative_territorial_entity . { { resource:Robert_Hemmerdinger property:country_of_citizenship ?b } UNION { resource:Middle_Farmhouse property:country ?b } } }
[]
designation for an administrative territorial entity
Q142 Q145
SYSTEM
France, United Kingdom
Q142 Q145
OR((Q3435376,P27,c(Q15617994)), (Q26495230,P17,c(Q15617994)))
action filter_type
action union
action find
entity Q3435376
relation P27
action find
entity Q26495230
relation P17
type Q15617994
Robert Hemmerdinger belong to [ANSWERS]
{'OR': [['Q3435376', 'P27', {'concept': 'Q15617994'}], ['Q26495230', 'P17', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?b WHERE { ?b rdf:type ontology:Q15617994 . { { resource:Q3435376 property:P27 ?b } UNION { resource:Q26495230 property:P17 ?b } } }
France United Kingdom
Robert Hemmerdinger belong to France and United Kingdom
France United Kingdom
action filter_type
action union
action find
entity Robert Hemmerdinger
relation country of citizenship
action find
entity Middle Farmhouse
relation country
type designation for an administrative territorial entity
{'OR': [['Robert Hemmerdinger', 'country of citizenship', {'concept': 'designation for an administrative territorial entity'}], ['Middle Farmhouse', 'country', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?b WHERE { ?b rdf:type ontology:designation_for_an_administrative_territorial_entity . { { resource:Robert_Hemmerdinger property:country_of_citizenship ?b } UNION { resource:Middle_Farmhouse property:country ?b } } }
[]
Comparative Reasoning (All)
Comparative|More/Less|Single entity type
Q769
P530
Q15617994 Q1048835
USER
Which political territories have ambassadorial relations with around the same number of administrative territories as Grenada ?
(c(Q1048835),P530,c(Q15617994))
action approx
action find_tuple_counts
relation P530
type Q1048835
type Q15617994
action count
action filter_type
action find
entity Q769
relation P530
type Q1048835
[{'concept': 'Q1048835'}, 'P530', {'concept': 'Q15617994'}]
SELECT DISTINCT ?v WHERE { { SELECT DISTINCT ?v ( COUNT ( ?z ) AS ?d ) WHERE { ?v property:P530 ?z . ?v rdf:type ontology:Q1048835 . ?z rdf:type ontology:Q15617994 } GROUP BY ?v } . { SELECT DISTINCT ( COUNT ( ?o ) AS ?n ) WHERE { ?o rdf:type ontology:Q1048835 . resource:Q769 property:P530 ?o } } . FILTER ( ?d = ?n ) }
Grenada
action approx
action find_tuple_counts
relation diplomatic relation
type political territorial entity
type designation for an administrative territorial entity
action count
action filter_type
action find
entity Grenada
relation diplomatic relation
type political territorial entity
[{'concept': 'political territorial entity'}, 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?v WHERE { { SELECT DISTINCT ?v ( COUNT ( ?z ) AS ?d ) WHERE { ?v property:diplomatic_relation ?z . ?v rdf:type ontology:political_territorial_entity . ?z rdf:type ontology:designation_for_an_administrative_territorial_entity } GROUP BY ?v } . { SELECT DISTINCT ( COUNT ( ?o ) AS ?n ) WHERE { ?o rdf:type ontology:political_territorial_entity . resource:Grenada property:diplomatic_relation ?o } } . FILTER ( ?d = ?n ) }
[]
designation for an administrative territorial entity political territorial entity
Q35 Q16 Q40
SYSTEM
Denmark, Canada, Austria
Q1000 Q40 Q781 Q778 Q769 Q685 Q35 Q691 Q16 Q664 Q766
(c(Q1048835),P530,c(Q15617994))
action approx
action find_tuple_counts
relation P530
type Q1048835
type Q15617994
action count
action filter_type
action find
entity Q769
relation P530
type Q1048835
[ANSWERS] have ambassadorial relations with around the same number of administrative territories as Grenada
[{'concept': 'Q1048835'}, 'P530', {'concept': 'Q15617994'}]
SELECT DISTINCT ?v WHERE { { SELECT DISTINCT ?v ( COUNT ( ?z ) AS ?d ) WHERE { ?v property:P530 ?z . ?v rdf:type ontology:Q1048835 . ?z rdf:type ontology:Q15617994 } GROUP BY ?v } . { SELECT DISTINCT ( COUNT ( ?o ) AS ?n ) WHERE { ?o rdf:type ontology:Q1048835 . resource:Q769 property:P530 ?o } } . FILTER ( ?d = ?n ) }
Gabon Austria Antigua and Barbuda The Bahamas Grenada Solomon Islands Denmark Papua New Guinea Canada New Zealand Jamaica
Denmark, Canada and Austria have ambassadorial relations with around the same number of administrative territories as Grenada
Denmark Canada Austria
action approx
action find_tuple_counts
relation diplomatic relation
type political territorial entity
type designation for an administrative territorial entity
action count
action filter_type
action find
entity Grenada
relation diplomatic relation
type political territorial entity
[{'concept': 'political territorial entity'}, 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?v WHERE { { SELECT DISTINCT ?v ( COUNT ( ?z ) AS ?d ) WHERE { ?v property:diplomatic_relation ?z . ?v rdf:type ontology:political_territorial_entity . ?z rdf:type ontology:designation_for_an_administrative_territorial_entity } GROUP BY ?v } . { SELECT DISTINCT ( COUNT ( ?o ) AS ?n ) WHERE { ?o rdf:type ontology:political_territorial_entity . resource:Grenada property:diplomatic_relation ?o } } . FILTER ( ?d = ?n ) }
[]
Comparative Reasoning (All)
Comparative|More/Less|Single entity type|Incomplete
Q781
P530
Q15617994 Q1048835
USER
And what about Antigua and Barbuda?
(c(Q1048835),P530,c(Q15617994))
action approx
action find_tuple_counts
relation P530
type Q1048835
type Q15617994
action count
action filter_type
action find
entity Q781
relation P530
type Q1048835
[{'concept': 'Q1048835'}, 'P530', {'concept': 'Q15617994'}]
SELECT DISTINCT ?a WHERE { { SELECT DISTINCT ?a ( COUNT ( ?u ) AS ?q ) WHERE { ?a property:P530 ?u . ?a rdf:type ontology:Q1048835 . ?u rdf:type ontology:Q15617994 } GROUP BY ?a } . { SELECT DISTINCT ( COUNT ( ?b ) AS ?i ) WHERE { resource:Q781 property:P530 ?b . ?b rdf:type ontology:Q1048835 } } . FILTER ( ?q = ?i ) }
Antigua and Barbuda
action approx
action find_tuple_counts
relation diplomatic relation
type political territorial entity
type designation for an administrative territorial entity
action count
action filter_type
action find
entity Antigua and Barbuda
relation diplomatic relation
type political territorial entity
[{'concept': 'political territorial entity'}, 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?a WHERE { { SELECT DISTINCT ?a ( COUNT ( ?u ) AS ?q ) WHERE { ?a property:diplomatic_relation ?u . ?a rdf:type ontology:political_territorial_entity . ?u rdf:type ontology:designation_for_an_administrative_territorial_entity } GROUP BY ?a } . { SELECT DISTINCT ( COUNT ( ?b ) AS ?i ) WHERE { resource:Antigua_and_Barbuda property:diplomatic_relation ?b . ?b rdf:type ontology:political_territorial_entity } } . FILTER ( ?q = ?i ) }
[]
designation for an administrative territorial entity political territorial entity
Q35 Q16 Q40
SYSTEM
Denmark, Canada, Austria
Q1000 Q40 Q781 Q778 Q769 Q685 Q35 Q691 Q16 Q664 Q766
(c(Q1048835),P530,c(Q15617994))
action approx
action find_tuple_counts
relation P530
type Q1048835
type Q15617994
action count
action filter_type
action find
entity Q781
relation P530
type Q1048835
[ANSWERS]
[{'concept': 'Q1048835'}, 'P530', {'concept': 'Q15617994'}]
SELECT DISTINCT ?a WHERE { { SELECT DISTINCT ?a ( COUNT ( ?u ) AS ?q ) WHERE { ?a property:P530 ?u . ?a rdf:type ontology:Q1048835 . ?u rdf:type ontology:Q15617994 } GROUP BY ?a } . { SELECT DISTINCT ( COUNT ( ?b ) AS ?i ) WHERE { resource:Q781 property:P530 ?b . ?b rdf:type ontology:Q1048835 } } . FILTER ( ?q = ?i ) }
Gabon Austria Antigua and Barbuda The Bahamas Grenada Solomon Islands Denmark Papua New Guinea Canada New Zealand Jamaica
Denmark Canada Austria
action approx
action find_tuple_counts
relation diplomatic relation
type political territorial entity
type designation for an administrative territorial entity
action count
action filter_type
action find
entity Antigua and Barbuda
relation diplomatic relation
type political territorial entity
[{'concept': 'political territorial entity'}, 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?a WHERE { { SELECT DISTINCT ?a ( COUNT ( ?u ) AS ?q ) WHERE { ?a property:diplomatic_relation ?u . ?a rdf:type ontology:political_territorial_entity . ?u rdf:type ontology:designation_for_an_administrative_territorial_entity } GROUP BY ?a } . { SELECT DISTINCT ( COUNT ( ?b ) AS ?i ) WHERE { resource:Antigua_and_Barbuda property:diplomatic_relation ?b . ?b rdf:type ontology:political_territorial_entity } } . FILTER ( ?q = ?i ) }
[]
Verification (Boolean) (All)
Verification|one entity, multiple entities (as object) referred indirectly
Q38
P530
Q15617994
USER
Do Italy have diplomatic associations with those political territories ?
(Q38,P530,Q35) (Q38,P530,Q16) (Q38,P530,Q40)
action is_in
entity prev_answer
action find
entity Q38
relation P530
['Q38', 'P530', 'Q35'] ['Q38', 'P530', 'Q16'] ['Q38', 'P530', 'Q40']
ASK WHERE { resource:Q38 property:P530 ?n . VALUES ( ?n ) { ( resource:Q1000 ) ( resource:Q40 ) ( resource:Q781 ) } }
Italy
action is_in
entity prev_answer
action find
entity Italy
relation diplomatic relation
['Italy', 'diplomatic relation', 'Denmark'] ['Italy', 'diplomatic relation', 'Canada'] ['Italy', 'diplomatic relation', 'Austria']
ASK WHERE { resource:Italy property:diplomatic_relation ?n . VALUES ( ?n ) { ( resource:Gabon ) ( resource:Austria ) ( resource:Antigua_and_Barbuda ) } }
[]
designation for an administrative territorial entity
SYSTEM
YES
(Q38,P530,Q35) (Q38,P530,Q16) (Q38,P530,Q40)
action is_in
entity prev_answer
action find
entity Q38
relation P530
[ANSWER]
['Q38', 'P530', 'Q35'] ['Q38', 'P530', 'Q16'] ['Q38', 'P530', 'Q40']
ASK WHERE { resource:Q38 property:P530 ?n . VALUES ( ?n ) { ( resource:Q1000 ) ( resource:Q40 ) ( resource:Q781 ) } }
Yes
action is_in
entity prev_answer
action find
entity Italy
relation diplomatic relation
['Italy', 'diplomatic relation', 'Denmark'] ['Italy', 'diplomatic relation', 'Canada'] ['Italy', 'diplomatic relation', 'Austria']
ASK WHERE { resource:Italy property:diplomatic_relation ?n . VALUES ( ?n ) { ( resource:Gabon ) ( resource:Austria ) ( resource:Antigua_and_Barbuda ) } }
[]
Quantitative Reasoning (Count) (All)
Quantitative|Count|Logical operators
Q16
P47
Q15617994 Q1048835
USER
How many administrative territories or political territories share border with Canada ?
(Q16,P47,c(Q15617994)) (Q16,P47,c(Q1048835))
action count
action union
action filter_type
action find
entity Q16
relation P47
type Q15617994
action filter_type
action find
entity Q16
relation P47
type Q1048835
['Q16', 'P47', {'concept': 'Q15617994'}] ['Q16', 'P47', {'concept': 'Q1048835'}]
SELECT DISTINCT ( COUNT ( ?r ) AS ?x ) WHERE { VALUES ( ?v ) { ( ontology:Q15617994 ) ( ontology:Q1048835 ) } . ?r rdf:type ?v }
Canada
action count
action union
action filter_type
action find
entity Canada
relation shares border with
type designation for an administrative territorial entity
action filter_type
action find
entity Canada
relation shares border with
type political territorial entity
['Canada', 'shares border with', {'concept': 'designation for an administrative territorial entity'}] ['Canada', 'shares border with', {'concept': 'political territorial entity'}]
SELECT DISTINCT ( COUNT ( ?r ) AS ?x ) WHERE { VALUES ( ?v ) { ( ontology:designation_for_an_administrative_territorial_entity ) ( ontology:political_territorial_entity ) } . ?r rdf:type ?v }
[]
designation for an administrative territorial entity political territorial entity
SYSTEM
6
Q1979 Q223 Q4969463 Q30 Q38610 Q34617
(Q16,P47,c(Q15617994)) (Q16,P47,c(Q1048835))
action count
action union
action filter_type
action find
entity Q16
relation P47
type Q15617994
action filter_type
action find
entity Q16
relation P47
type Q1048835
[ANSWER]
['Q16', 'P47', {'concept': 'Q15617994'}] ['Q16', 'P47', {'concept': 'Q1048835'}]
SELECT DISTINCT ( COUNT ( ?r ) AS ?x ) WHERE { VALUES ( ?v ) { ( ontology:Q15617994 ) ( ontology:Q1048835 ) } . ?r rdf:type ?v }
Prince Edward Island Greenland British Arctic Territories United States of America Dominion of Newfoundland Saint Pierre and Miquelon
6
action count
action union
action filter_type
action find
entity Canada
relation shares border with
type designation for an administrative territorial entity
action filter_type
action find
entity Canada
relation shares border with
type political territorial entity
['Canada', 'shares border with', {'concept': 'designation for an administrative territorial entity'}] ['Canada', 'shares border with', {'concept': 'political territorial entity'}]
SELECT DISTINCT ( COUNT ( ?r ) AS ?x ) WHERE { VALUES ( ?v ) { ( ontology:designation_for_an_administrative_territorial_entity ) ( ontology:political_territorial_entity ) } . ?r rdf:type ?v }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P706
Q56061 Q271669 Q15617994
USER
Which administrative territories are located in max number of administrative territories or landforms ?
(c(Q15617994),P706,c(Q56061)|c(Q271669))
action argmax
action union
action find_tuple_counts
relation P706
type Q15617994
type Q56061
action find_tuple_counts
relation P706
type Q15617994
type Q271669
[{'concept': 'Q15617994'}, 'P706', [{'concept': 'Q56061'}, {'concept': 'Q271669'}]]
SELECT DISTINCT ?o WHERE { { SELECT DISTINCT ( MAX ( ?z ) AS ?e ) { SELECT DISTINCT ( COUNT ( ?m ) AS ?z ) ?p WHERE { ?m rdf:type ?v . VALUES ( ?v ) { ( ontology:Q56061 ) ( ontology:Q271669 ) } } GROUP BY ?p } } . FILTER ( ?b = ?e ) . { SELECT DISTINCT ( COUNT ( ?a ) AS ?b ) ?o WHERE { { ?o property:P706 ?a . ?o rdf:type ontology:Q15617994 . ?a rdf:type ontology:Q56061 } UNION { ?o property:P706 ?a . ?o rdf:type ontology:Q15617994 . ?a rdf:type ontology:Q271669 } } GROUP BY ?o } }
action argmax
action union
action find_tuple_counts
relation located on terrain feature
type designation for an administrative territorial entity
type administrative territorial entity
action find_tuple_counts
relation located on terrain feature
type designation for an administrative territorial entity
type landform
[{'concept': 'designation for an administrative territorial entity'}, 'located on terrain feature', [{'concept': 'administrative territorial entity'}, {'concept': 'landform'}]]
SELECT DISTINCT ?o WHERE { { SELECT DISTINCT ( MAX ( ?z ) AS ?e ) { SELECT DISTINCT ( COUNT ( ?m ) AS ?z ) ?p WHERE { ?m rdf:type ?v . VALUES ( ?v ) { ( ontology:administrative_territorial_entity ) ( ontology:landform ) } } GROUP BY ?p } } . FILTER ( ?b = ?e ) . { SELECT DISTINCT ( COUNT ( ?a ) AS ?b ) ?o WHERE { { ?o property:located_on_terrain_feature ?a . ?o rdf:type ontology:designation_for_an_administrative_territorial_entity . ?a rdf:type ontology:administrative_territorial_entity } UNION { ?o property:located_on_terrain_feature ?a . ?o rdf:type ontology:designation_for_an_administrative_territorial_entity . ?a rdf:type ontology:landform } } GROUP BY ?o } }
[]
administrative territorial entity landform designation for an administrative territorial entity
Q145
SYSTEM
United Kingdom
Q145
(c(Q15617994),P706,c(Q56061)|c(Q271669))
action argmax
action union
action find_tuple_counts
relation P706
type Q15617994
type Q56061
action find_tuple_counts
relation P706
type Q15617994
type Q271669
[ANSWER] is located in max number of administrative territories or landforms
[{'concept': 'Q15617994'}, 'P706', [{'concept': 'Q56061'}, {'concept': 'Q271669'}]]
SELECT DISTINCT ?o WHERE { { SELECT DISTINCT ( MAX ( ?z ) AS ?e ) { SELECT DISTINCT ( COUNT ( ?m ) AS ?z ) ?p WHERE { ?m rdf:type ?v . VALUES ( ?v ) { ( ontology:Q56061 ) ( ontology:Q271669 ) } } GROUP BY ?p } } . FILTER ( ?b = ?e ) . { SELECT DISTINCT ( COUNT ( ?a ) AS ?b ) ?o WHERE { { ?o property:P706 ?a . ?o rdf:type ontology:Q15617994 . ?a rdf:type ontology:Q56061 } UNION { ?o property:P706 ?a . ?o rdf:type ontology:Q15617994 . ?a rdf:type ontology:Q271669 } } GROUP BY ?o } }
United Kingdom
United Kingdom is located in max number of administrative territories or landforms
United Kingdom
action argmax
action union
action find_tuple_counts
relation located on terrain feature
type designation for an administrative territorial entity
type administrative territorial entity
action find_tuple_counts
relation located on terrain feature
type designation for an administrative territorial entity
type landform
[{'concept': 'designation for an administrative territorial entity'}, 'located on terrain feature', [{'concept': 'administrative territorial entity'}, {'concept': 'landform'}]]
SELECT DISTINCT ?o WHERE { { SELECT DISTINCT ( MAX ( ?z ) AS ?e ) { SELECT DISTINCT ( COUNT ( ?m ) AS ?z ) ?p WHERE { ?m rdf:type ?v . VALUES ( ?v ) { ( ontology:administrative_territorial_entity ) ( ontology:landform ) } } GROUP BY ?p } } . FILTER ( ?b = ?e ) . { SELECT DISTINCT ( COUNT ( ?a ) AS ?b ) ?o WHERE { { ?o property:located_on_terrain_feature ?a . ?o rdf:type ontology:designation_for_an_administrative_territorial_entity . ?a rdf:type ontology:administrative_territorial_entity } UNION { ?o property:located_on_terrain_feature ?a . ?o rdf:type ontology:designation_for_an_administrative_territorial_entity . ?a rdf:type ontology:landform } } GROUP BY ?o } }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q1100437 Q35
P47
Q1048835
USER
Which political territories are bordered by Denmark or Burguillos del Cerro ?
OR((Q35,P47,c(Q1048835)), (Q1100437,P47,c(Q1048835)))
action filter_type
action union
action find
entity Q35
relation P47
action find
entity Q1100437
relation P47
type Q1048835
{'OR': [['Q35', 'P47', {'concept': 'Q1048835'}], ['Q1100437', 'P47', {'concept': 'Q1048835'}]]}
SELECT DISTINCT ?f WHERE { { VALUES ( ?k ) { ( resource:Q1100437 ) ( resource:Q35 ) } . ?k property:P47 ?f } . ?f rdf:type ontology:Q1048835 }
Burguillos del Cerro Denmark
action filter_type
action union
action find
entity Denmark
relation shares border with
action find
entity Burguillos del Cerro
relation shares border with
type political territorial entity
{'OR': [['Denmark', 'shares border with', {'concept': 'political territorial entity'}], ['Burguillos del Cerro', 'shares border with', {'concept': 'political territorial entity'}]]}
SELECT DISTINCT ?f WHERE { { VALUES ( ?k ) { ( resource:Burguillos_del_Cerro ) ( resource:Denmark ) } . ?k property:shares_border_with ?f } . ?f rdf:type ontology:political_territorial_entity }
[]
political territorial entity
Q1368859 Q183
SYSTEM
Alconera, Germany
Q1368859 Q183
OR((Q35,P47,c(Q1048835)), (Q1100437,P47,c(Q1048835)))
action filter_type
action union
action find
entity Q35
relation P47
action find
entity Q1100437
relation P47
type Q1048835
[ANSWERS] are bordered by Denmark or Burguillos del Cerro
{'OR': [['Q35', 'P47', {'concept': 'Q1048835'}], ['Q1100437', 'P47', {'concept': 'Q1048835'}]]}
SELECT DISTINCT ?f WHERE { { VALUES ( ?k ) { ( resource:Q1100437 ) ( resource:Q35 ) } . ?k property:P47 ?f } . ?f rdf:type ontology:Q1048835 }
Alconera Germany
Alconera and Germany are bordered by Denmark or Burguillos del Cerro
Alconera Germany
action filter_type
action union
action find
entity Denmark
relation shares border with
action find
entity Burguillos del Cerro
relation shares border with
type political territorial entity
{'OR': [['Denmark', 'shares border with', {'concept': 'political territorial entity'}], ['Burguillos del Cerro', 'shares border with', {'concept': 'political territorial entity'}]]}
SELECT DISTINCT ?f WHERE { { VALUES ( ?k ) { ( resource:Burguillos_del_Cerro ) ( resource:Denmark ) } . ?k property:shares_border_with ?f } . ?f rdf:type ontology:political_territorial_entity }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P530
Q1048835 Q15617994 Q1048835
USER
Which political territories have diplomatic relationships with max number of administrative territories and political territories ?
(c(Q15617994)|c(Q1048835),P530,c(Q1048835))
action argmax
action union
action find_reverse_tuple_counts
relation P530
type Q1048835
type Q15617994
action find_reverse_tuple_counts
relation P530
type Q1048835
type Q1048835
[[{'concept': 'Q15617994'}, {'concept': 'Q1048835'}], 'P530', {'concept': 'Q1048835'}]
SELECT DISTINCT ?t WHERE { { SELECT DISTINCT ( MAX ( ?g ) AS ?q ) { SELECT DISTINCT ( COUNT ( ?r ) AS ?g ) ?a WHERE { VALUES ( ?u ) { ( ontology:Q15617994 ) ( ontology:Q1048835 ) } . ?r rdf:type ?u } GROUP BY ?a } } . { SELECT DISTINCT ( COUNT ( ?f ) AS ?e ) ?t WHERE { VALUES ( ?j ) { ( ontology:Q15617994 ) ( ontology:Q1048835 ) } . ?f rdf:type ?j } GROUP BY ?t } . FILTER ( ?e = ?q ) }
action argmax
action union
action find_reverse_tuple_counts
relation diplomatic relation
type political territorial entity
type designation for an administrative territorial entity
action find_reverse_tuple_counts
relation diplomatic relation
type political territorial entity
type political territorial entity
[[{'concept': 'designation for an administrative territorial entity'}, {'concept': 'political territorial entity'}], 'diplomatic relation', {'concept': 'political territorial entity'}]
SELECT DISTINCT ?t WHERE { { SELECT DISTINCT ( MAX ( ?g ) AS ?q ) { SELECT DISTINCT ( COUNT ( ?r ) AS ?g ) ?a WHERE { VALUES ( ?u ) { ( ontology:designation_for_an_administrative_territorial_entity ) ( ontology:political_territorial_entity ) } . ?r rdf:type ?u } GROUP BY ?a } } . { SELECT DISTINCT ( COUNT ( ?f ) AS ?e ) ?t WHERE { VALUES ( ?j ) { ( ontology:designation_for_an_administrative_territorial_entity ) ( ontology:political_territorial_entity ) } . ?f rdf:type ?j } GROUP BY ?t } . FILTER ( ?e = ?q ) }
[]
political territorial entity designation for an administrative territorial entity political territorial entity
Q183
SYSTEM
Germany
Q183
(c(Q15617994)|c(Q1048835),P530,c(Q1048835))
action argmax
action union
action find_reverse_tuple_counts
relation P530
type Q1048835
type Q15617994
action find_reverse_tuple_counts
relation P530
type Q1048835
type Q1048835
[ANSWER] have diplomatic relationships with max number of administrative territories and political territories
[[{'concept': 'Q15617994'}, {'concept': 'Q1048835'}], 'P530', {'concept': 'Q1048835'}]
SELECT DISTINCT ?t WHERE { { SELECT DISTINCT ( MAX ( ?g ) AS ?q ) { SELECT DISTINCT ( COUNT ( ?r ) AS ?g ) ?a WHERE { VALUES ( ?u ) { ( ontology:Q15617994 ) ( ontology:Q1048835 ) } . ?r rdf:type ?u } GROUP BY ?a } } . { SELECT DISTINCT ( COUNT ( ?f ) AS ?e ) ?t WHERE { VALUES ( ?j ) { ( ontology:Q15617994 ) ( ontology:Q1048835 ) } . ?f rdf:type ?j } GROUP BY ?t } . FILTER ( ?e = ?q ) }
Germany
Germany have diplomatic relationships with max number of administrative territories and political territories
Germany
action argmax
action union
action find_reverse_tuple_counts
relation diplomatic relation
type political territorial entity
type designation for an administrative territorial entity
action find_reverse_tuple_counts
relation diplomatic relation
type political territorial entity
type political territorial entity
[[{'concept': 'designation for an administrative territorial entity'}, {'concept': 'political territorial entity'}], 'diplomatic relation', {'concept': 'political territorial entity'}]
SELECT DISTINCT ?t WHERE { { SELECT DISTINCT ( MAX ( ?g ) AS ?q ) { SELECT DISTINCT ( COUNT ( ?r ) AS ?g ) ?a WHERE { VALUES ( ?u ) { ( ontology:designation_for_an_administrative_territorial_entity ) ( ontology:political_territorial_entity ) } . ?r rdf:type ?u } GROUP BY ?a } } . { SELECT DISTINCT ( COUNT ( ?f ) AS ?e ) ?t WHERE { VALUES ( ?j ) { ( ontology:designation_for_an_administrative_territorial_entity ) ( ontology:political_territorial_entity ) } . ?f rdf:type ?j } GROUP BY ?t } . FILTER ( ?e = ?q ) }
[]