Simple Question (Direct)
Simple Question
Q2425627
P106
Q151885
USER
What does Thomas Körner do for a living ?
(Q2425627,P106,c(Q151885))
action filter_type
action find
entity Q2425627
relation P106
type Q151885
['Q2425627', 'P106', {'concept': 'Q151885'}]
SELECT DISTINCT ?x WHERE { resource:Q2425627 property:P106 ?x . ?x rdf:type ontology:Q151885 }
Thomas Körner
action filter_type
action find
entity Thomas Körner
relation occupation
type concept
['Thomas Körner', 'occupation', {'concept': 'concept'}]
SELECT DISTINCT ?x WHERE { resource:Thomas_Körner property:occupation ?x . ?x rdf:type ontology:concept }
[]
concept
Q482980
SYSTEM
author
Q482980
(Q2425627,P106,c(Q151885))
action filter_type
action find
entity Q2425627
relation P106
type Q151885
[ANSWER] Thomas Körner does for a living
['Q2425627', 'P106', {'concept': 'Q151885'}]
SELECT DISTINCT ?x WHERE { resource:Q2425627 property:P106 ?x . ?x rdf:type ontology:Q151885 }
author
Author Thomas Körner does for a living
author
action filter_type
action find
entity Thomas Körner
relation occupation
type concept
['Thomas Körner', 'occupation', {'concept': 'concept'}]
SELECT DISTINCT ?x WHERE { resource:Thomas_Körner property:occupation ?x . ?x rdf:type ontology:concept }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q2425627
P19
Q486972
USER
Which human settlement was that person born at ?
(Q482980,P19,c(Q486972))
action filter_type
action find
entity Q2425627
relation P19
type Q486972
['Q482980', 'P19', {'concept': 'Q486972'}]
SELECT DISTINCT ?z WHERE { ?z rdf:type ontology:Q486972 . resource:Q2425627 property:P19 ?z }
Thomas Körner
action filter_type
action find
entity Thomas Körner
relation place of birth
type human settlement
['author', 'place of birth', {'concept': 'human settlement'}]
SELECT DISTINCT ?z WHERE { ?z rdf:type ontology:human_settlement . resource:Thomas_Körner property:place_of_birth ?z }
[]
human settlement
Q1799
SYSTEM
Wrocław
Q1799
(Q482980,P19,c(Q486972))
action filter_type
action find
entity Q2425627
relation P19
type Q486972
That person was born in [ANSWER]
['Q482980', 'P19', {'concept': 'Q486972'}]
SELECT DISTINCT ?z WHERE { ?z rdf:type ontology:Q486972 . resource:Q2425627 property:P19 ?z }
Wrocław
That person was born in Wrocław
Wrocław
action filter_type
action find
entity Thomas Körner
relation place of birth
type human settlement
['author', 'place of birth', {'concept': 'human settlement'}]
SELECT DISTINCT ?z WHERE { ?z rdf:type ontology:human_settlement . resource:Thomas_Körner property:place_of_birth ?z }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q1799
P6
Q502895
USER
Who is the head of the government of that human settlement ?
(Q1799,P6,c(Q502895))
action filter_type
action find
entity Q1799
relation P6
type Q502895
['Q1799', 'P6', {'concept': 'Q502895'}]
SELECT DISTINCT ?s WHERE { ?s rdf:type ontology:Q502895 . resource:Q1799 property:P6 ?s }
Wrocław
action filter_type
action find
entity Wrocław
relation head of government
type common name
['Wrocław', 'head of government', {'concept': 'common name'}]
SELECT DISTINCT ?s WHERE { ?s rdf:type ontology:common_name . resource:Wrocław property:head_of_government ?s }
[]
common name
Q2127075
SYSTEM
Rafał Dutkiewicz
Q2127075
(Q1799,P6,c(Q502895))
action filter_type
action find
entity Q1799
relation P6
type Q502895
The head of the government of that human settlement is Minister [ANSWER]
['Q1799', 'P6', {'concept': 'Q502895'}]
SELECT DISTINCT ?s WHERE { ?s rdf:type ontology:Q502895 . resource:Q1799 property:P6 ?s }
Rafał Dutkiewicz
The head of the government of that human settlement is Minister Rafał Dutkiewicz
Rafał Dutkiewicz
action filter_type
action find
entity Wrocław
relation head of government
type common name
['Wrocław', 'head of government', {'concept': 'common name'}]
SELECT DISTINCT ?s WHERE { ?s rdf:type ontology:common_name . resource:Wrocław property:head_of_government ?s }
[]
Simple Question (Ellipsis)
only subject is changed, parent and predicate remains same
Q16426206
Q502895
USER
And what about Iclod?
(Q16426206,P6,c(Q502895))
action filter_type
action find
entity Q16426206
relation P6
type Q502895
['Q16426206', 'P6', {'concept': 'Q502895'}]
SELECT DISTINCT ?t WHERE { ?t rdf:type ontology:Q502895 . resource:Q16426206 property:P6 ?t }
Iclod
action filter_type
action find
entity Iclod
relation head of government
type common name
['Iclod', 'head of government', {'concept': 'common name'}]
SELECT DISTINCT ?t WHERE { ?t rdf:type ontology:common_name . resource:Iclod property:head_of_government ?t }
[]
common name
Q26237650
SYSTEM
Emil Ioan Pîrțoc
Q26237650
(Q16426206,P6,c(Q502895))
action filter_type
action find
entity Q16426206
relation P6
type Q502895
[ANSWER]
['Q16426206', 'P6', {'concept': 'Q502895'}]
SELECT DISTINCT ?t WHERE { ?t rdf:type ontology:Q502895 . resource:Q16426206 property:P6 ?t }
Emil Ioan Pîrțoc
Emil Ioan Pîrțoc
action filter_type
action find
entity Iclod
relation head of government
type common name
['Iclod', 'head of government', {'concept': 'common name'}]
SELECT DISTINCT ?t WHERE { ?t rdf:type ontology:common_name . resource:Iclod property:head_of_government ?t }
[]
Verification (Boolean) (All)
Verification|2 entities, one direct and one indirect, subject is indirect
Q26237650 Q3612394
P102
Q7210356
USER
Is that person affiliated with Sicilian Alliance ?
(Q26237650,P102,Q3612394)
action is_in
entity Q3612394
action find
entity Q26237650
relation P102
['Q26237650', 'P102', 'Q3612394']
ASK WHERE { resource:Q26237650 property:P102 resource:Q3612394 }
Emil Ioan Pîrțoc Sicilian Alliance
action is_in
entity Sicilian Alliance
action find
entity Emil Ioan Pîrțoc
relation member of political party
['Emil Ioan Pîrțoc', 'member of political party', 'Sicilian Alliance']
ASK WHERE { resource:Emil_Ioan_Pîrțoc property:member_of_political_party resource:Sicilian_Alliance }
[]
political organization
SYSTEM
NO
(Q26237650,P102,Q3612394)
action is_in
entity Q3612394
action find
entity Q26237650
relation P102
[ANSWER]
['Q26237650', 'P102', 'Q3612394']
ASK WHERE { resource:Q26237650 property:P102 resource:Q3612394 }
No
action is_in
entity Sicilian Alliance
action find
entity Emil Ioan Pîrțoc
relation member of political party
['Emil Ioan Pîrțoc', 'member of political party', 'Sicilian Alliance']
ASK WHERE { resource:Emil_Ioan_Pîrțoc property:member_of_political_party resource:Sicilian_Alliance }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q26237650
P27
Q15617994
USER
Which administrative territory is that person an inhabitant of ?
action filter_type
action find
entity Q26237650
relation P27
type Q15617994
SELECT DISTINCT ?q WHERE { resource:Q26237650 property:P27 ?q . ?q rdf:type ontology:Q15617994 }
Emil Ioan Pîrțoc
action filter_type
action find
entity Emil Ioan Pîrțoc
relation country of citizenship
type designation for an administrative territorial entity
SELECT DISTINCT ?q WHERE { resource:Emil_Ioan_Pîrțoc property:country_of_citizenship ?q . ?q rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
designation for an administrative territorial entity
Q218
SYSTEM
Romania
Q218
action filter_type
action find
entity Q26237650
relation P27
type Q15617994
[ANSWER] is that person an inhabitant of
SELECT DISTINCT ?q WHERE { resource:Q26237650 property:P27 ?q . ?q rdf:type ontology:Q15617994 }
Romania
Romania is that person an inhabitant of
Romania
action filter_type
action find
entity Emil Ioan Pîrțoc
relation country of citizenship
type designation for an administrative territorial entity
SELECT DISTINCT ?q WHERE { resource:Emil_Ioan_Pîrțoc property:country_of_citizenship ?q . ?q rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
Verification (Boolean) (All)
Verification|2 entities, one direct and one indirect, object is indirect
Q218 Q432758
P27
Q502895
USER
Is Natasha Arthy a citizen of that administrative territory ?
(Q432758,P27,Q218)
action is_in
entity Q432758
action find
entity Q218
relation P27
['Q432758', 'P27', 'Q218']
ASK WHERE { resource:Q218 property:P27 resource:Q432758 }
Romania Natasha Arthy
action is_in
entity Natasha Arthy
action find
entity Romania
relation country of citizenship
['Natasha Arthy', 'country of citizenship', 'Romania']
ASK WHERE { resource:Romania property:country_of_citizenship resource:Natasha_Arthy }
[]
common name
SYSTEM
NO
(Q432758,P27,Q218)
action is_in
entity Q432758
action find
entity Q218
relation P27
[ANSWER]
['Q432758', 'P27', 'Q218']
ASK WHERE { resource:Q218 property:P27 resource:Q432758 }
No
action is_in
entity Natasha Arthy
action find
entity Romania
relation country of citizenship
['Natasha Arthy', 'country of citizenship', 'Romania']
ASK WHERE { resource:Romania property:country_of_citizenship resource:Natasha_Arthy }
[]
Comparative Reasoning (Count) (All)
Comparative|Count over More/Less|Mult. entity type
Q18621202
P669
Q83620 Q34442 Q486972
USER
How many human settlements are located on lesser number of thoroughfares or roads than La Samaritiaine, store 1 ?
(c(Q486972),P669,c(Q83620)|c(Q34442))
action count
action less
action union
action find_tuple_counts
relation P669
type Q486972
type Q83620
action find_tuple_counts
relation P669
type Q486972
type Q34442
action count
action filter_multi_types
action find
entity Q18621202
relation P669
type Q83620
type Q34442
[{'concept': 'Q486972'}, 'P669', [{'concept': 'Q83620'}, {'concept': 'Q34442'}]]
SELECT DISTINCT ( COUNT ( ?l ) AS ?j ) WHERE { { SELECT DISTINCT ( COUNT ( ?x ) AS ?k ) ?l WHERE { { ?l property:P669 ?x . ?l rdf:type ontology:Q486972 . ?x rdf:type ontology:Q83620 } UNION { ?l property:P669 ?x . ?l rdf:type ontology:Q486972 . ?x rdf:type ontology:Q34442 } } GROUP BY ?l } . FILTER ( ?k < ?v ) . { SELECT DISTINCT ( COUNT ( ?y ) AS ?v ) WHERE { resource:Q18621202 property:P669 ?y . { { ?y rdf:type ontology:Q83620 } UNION { ?y rdf:type ontology:Q34442 } } } } }
La Samaritiaine, store 1
action count
action less
action union
action find_tuple_counts
relation located on street
type human settlement
type thoroughfare
action find_tuple_counts
relation located on street
type human settlement
type road
action count
action filter_multi_types
action find
entity La Samaritiaine, store 1
relation located on street
type thoroughfare
type road
[{'concept': 'human settlement'}, 'located on street', [{'concept': 'thoroughfare'}, {'concept': 'road'}]]
SELECT DISTINCT ( COUNT ( ?l ) AS ?j ) WHERE { { SELECT DISTINCT ( COUNT ( ?x ) AS ?k ) ?l WHERE { { ?l property:located_on_street ?x . ?l rdf:type ontology:human_settlement . ?x rdf:type ontology:thoroughfare } UNION { ?l property:located_on_street ?x . ?l rdf:type ontology:human_settlement . ?x rdf:type ontology:road } } GROUP BY ?l } . FILTER ( ?k < ?v ) . { SELECT DISTINCT ( COUNT ( ?y ) AS ?v ) WHERE { resource:La_Samaritiaine,_store_1 property:located_on_street ?y . { { ?y rdf:type ontology:thoroughfare } UNION { ?y rdf:type ontology:road } } } } }
[]
thoroughfare road human settlement
SYSTEM
20
Q1223143 Q18621205 Q2265735 Q1938652 Q1201569 Q1245761 Q21036953 Q1479273 Q4511331 Q2587975 Q810372 Q2035575 Q1478509 Q4572703 Q21039837 Q810340 Q759839 Q2230782 Q810328 Q399750
(c(Q486972),P669,c(Q83620)|c(Q34442))
action count
action less
action union
action find_tuple_counts
relation P669
type Q486972
type Q83620
action find_tuple_counts
relation P669
type Q486972
type Q34442
action count
action filter_multi_types
action find
entity Q18621202
relation P669
type Q83620
type Q34442
[ANSWER]
[{'concept': 'Q486972'}, 'P669', [{'concept': 'Q83620'}, {'concept': 'Q34442'}]]
SELECT DISTINCT ( COUNT ( ?l ) AS ?j ) WHERE { { SELECT DISTINCT ( COUNT ( ?x ) AS ?k ) ?l WHERE { { ?l property:P669 ?x . ?l rdf:type ontology:Q486972 . ?x rdf:type ontology:Q83620 } UNION { ?l property:P669 ?x . ?l rdf:type ontology:Q486972 . ?x rdf:type ontology:Q34442 } } GROUP BY ?l } . FILTER ( ?k < ?v ) . { SELECT DISTINCT ( COUNT ( ?y ) AS ?v ) WHERE { resource:Q18621202 property:P669 ?y . { { ?y rdf:type ontology:Q83620 } UNION { ?y rdf:type ontology:Q34442 } } } } }
Dietfurt in Mittelfranken La Samaritaine, store 3 Bovenkerk Mischelbach Dettenheim Dornhausen Laubenthal Massenbach Geislohe Unité d'Habitation de Marseille Unterasbach Ostheim Stopfenheim Brand Markhof Steinacker Rothenstein Schambach Schlungenhof Aha
20
action count
action less
action union
action find_tuple_counts
relation located on street
type human settlement
type thoroughfare
action find_tuple_counts
relation located on street
type human settlement
type road
action count
action filter_multi_types
action find
entity La Samaritiaine, store 1
relation located on street
type thoroughfare
type road
[{'concept': 'human settlement'}, 'located on street', [{'concept': 'thoroughfare'}, {'concept': 'road'}]]
SELECT DISTINCT ( COUNT ( ?l ) AS ?j ) WHERE { { SELECT DISTINCT ( COUNT ( ?x ) AS ?k ) ?l WHERE { { ?l property:located_on_street ?x . ?l rdf:type ontology:human_settlement . ?x rdf:type ontology:thoroughfare } UNION { ?l property:located_on_street ?x . ?l rdf:type ontology:human_settlement . ?x rdf:type ontology:road } } GROUP BY ?l } . FILTER ( ?k < ?v ) . { SELECT DISTINCT ( COUNT ( ?y ) AS ?v ) WHERE { resource:La_Samaritiaine,_store_1 property:located_on_street ?y . { { ?y rdf:type ontology:thoroughfare } UNION { ?y rdf:type ontology:road } } } } }
[]
Comparative Reasoning (Count) (All)
Comparative|Count over More/Less|Mult. entity type|Incomplete
Q18621205
P669
Q83620 Q34442 Q486972
USER
And also tell me about La Samaritaine, store 3?
(c(Q486972),P669,c(Q83620)|c(Q34442))
action count
action less
action union
action find_tuple_counts
relation P669
type Q486972
type Q83620
action find_tuple_counts
relation P669
type Q486972
type Q34442
action count
action filter_multi_types
action find
entity Q18621205
relation P669
type Q83620
type Q34442
[{'concept': 'Q486972'}, 'P669', [{'concept': 'Q83620'}, {'concept': 'Q34442'}]]
SELECT DISTINCT ( COUNT ( ?k ) AS ?n ) WHERE { { SELECT DISTINCT ( COUNT ( ?g ) AS ?l ) ?k WHERE { { ?k property:P669 ?g . ?k rdf:type ontology:Q486972 . ?g rdf:type ontology:Q83620 } UNION { ?k property:P669 ?g . ?g rdf:type ontology:Q34442 . ?k rdf:type ontology:Q486972 } } GROUP BY ?k } . FILTER ( ?l < ?o ) . { SELECT DISTINCT ( COUNT ( ?a ) AS ?o ) WHERE { resource:Q18621205 property:P669 ?a . { VALUES ( ?j ) { ( ontology:Q83620 ) ( ontology:Q34442 ) } . ?a rdf:type ?j } } } }
La Samaritaine, store 3
action count
action less
action union
action find_tuple_counts
relation located on street
type human settlement
type thoroughfare
action find_tuple_counts
relation located on street
type human settlement
type road
action count
action filter_multi_types
action find
entity La Samaritaine, store 3
relation located on street
type thoroughfare
type road
[{'concept': 'human settlement'}, 'located on street', [{'concept': 'thoroughfare'}, {'concept': 'road'}]]
SELECT DISTINCT ( COUNT ( ?k ) AS ?n ) WHERE { { SELECT DISTINCT ( COUNT ( ?g ) AS ?l ) ?k WHERE { { ?k property:located_on_street ?g . ?k rdf:type ontology:human_settlement . ?g rdf:type ontology:thoroughfare } UNION { ?k property:located_on_street ?g . ?g rdf:type ontology:road . ?k rdf:type ontology:human_settlement } } GROUP BY ?k } . FILTER ( ?l < ?o ) . { SELECT DISTINCT ( COUNT ( ?a ) AS ?o ) WHERE { resource:La_Samaritaine,_store_3 property:located_on_street ?a . { VALUES ( ?j ) { ( ontology:thoroughfare ) ( ontology:road ) } . ?a rdf:type ?j } } } }
[]
thoroughfare road human settlement
SYSTEM
19
Q1223143 Q2265735 Q1938652 Q1201569 Q1245761 Q21036953 Q1479273 Q4511331 Q2587975 Q810372 Q2035575 Q1478509 Q4572703 Q21039837 Q810340 Q759839 Q2230782 Q810328 Q399750
(c(Q486972),P669,c(Q83620)|c(Q34442))
action count
action less
action union
action find_tuple_counts
relation P669
type Q486972
type Q83620
action find_tuple_counts
relation P669
type Q486972
type Q34442
action count
action filter_multi_types
action find
entity Q18621205
relation P669
type Q83620
type Q34442
[ANSWER]
[{'concept': 'Q486972'}, 'P669', [{'concept': 'Q83620'}, {'concept': 'Q34442'}]]
SELECT DISTINCT ( COUNT ( ?k ) AS ?n ) WHERE { { SELECT DISTINCT ( COUNT ( ?g ) AS ?l ) ?k WHERE { { ?k property:P669 ?g . ?k rdf:type ontology:Q486972 . ?g rdf:type ontology:Q83620 } UNION { ?k property:P669 ?g . ?g rdf:type ontology:Q34442 . ?k rdf:type ontology:Q486972 } } GROUP BY ?k } . FILTER ( ?l < ?o ) . { SELECT DISTINCT ( COUNT ( ?a ) AS ?o ) WHERE { resource:Q18621205 property:P669 ?a . { VALUES ( ?j ) { ( ontology:Q83620 ) ( ontology:Q34442 ) } . ?a rdf:type ?j } } } }
Dietfurt in Mittelfranken Bovenkerk Mischelbach Dettenheim Dornhausen Laubenthal Massenbach Geislohe Unité d'Habitation de Marseille Unterasbach Ostheim Stopfenheim Brand Markhof Steinacker Rothenstein Schambach Schlungenhof Aha
19
action count
action less
action union
action find_tuple_counts
relation located on street
type human settlement
type thoroughfare
action find_tuple_counts
relation located on street
type human settlement
type road
action count
action filter_multi_types
action find
entity La Samaritaine, store 3
relation located on street
type thoroughfare
type road
[{'concept': 'human settlement'}, 'located on street', [{'concept': 'thoroughfare'}, {'concept': 'road'}]]
SELECT DISTINCT ( COUNT ( ?k ) AS ?n ) WHERE { { SELECT DISTINCT ( COUNT ( ?g ) AS ?l ) ?k WHERE { { ?k property:located_on_street ?g . ?k rdf:type ontology:human_settlement . ?g rdf:type ontology:thoroughfare } UNION { ?k property:located_on_street ?g . ?g rdf:type ontology:road . ?k rdf:type ontology:human_settlement } } GROUP BY ?k } . FILTER ( ?l < ?o ) . { SELECT DISTINCT ( COUNT ( ?a ) AS ?o ) WHERE { resource:La_Samaritaine,_store_3 property:located_on_street ?a . { VALUES ( ?j ) { ( ontology:thoroughfare ) ( ontology:road ) } . ?a rdf:type ?j } } } }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Single entity type
P530
Q15617994 Q15617994
USER
Which administrative territories have diplomatic relationships with max number of administrative territories ?
(c(Q15617994),P530,Q953)
action argmax
action find_tuple_counts
relation P530
type Q15617994
type Q15617994
[{'concept': 'Q15617994'}, 'P530', 'Q953']
SELECT DISTINCT ?w WHERE { { SELECT DISTINCT ( MAX ( ?l ) AS ?j ) { SELECT DISTINCT ?x ( COUNT ( ?c ) AS ?l ) WHERE { ?x property:P530 ?c . ?x rdf:type ontology:Q15617994 . ?c rdf:type ontology:Q15617994 } GROUP BY ?x } } . { SELECT DISTINCT ?w ( COUNT ( ?i ) AS ?q ) WHERE { ?w property:P530 ?i . ?w rdf:type ontology:Q15617994 . ?i rdf:type ontology:Q15617994 } GROUP BY ?w } . FILTER ( ?q = ?j ) }
action argmax
action find_tuple_counts
relation diplomatic relation
type designation for an administrative territorial entity
type designation for an administrative territorial entity
[{'concept': 'designation for an administrative territorial entity'}, 'diplomatic relation', 'Zambia']
SELECT DISTINCT ?w WHERE { { SELECT DISTINCT ( MAX ( ?l ) AS ?j ) { SELECT DISTINCT ?x ( COUNT ( ?c ) AS ?l ) WHERE { ?x property:diplomatic_relation ?c . ?x rdf:type ontology:designation_for_an_administrative_territorial_entity . ?c rdf:type ontology:designation_for_an_administrative_territorial_entity } GROUP BY ?x } } . { SELECT DISTINCT ?w ( COUNT ( ?i ) AS ?q ) WHERE { ?w property:diplomatic_relation ?i . ?w rdf:type ontology:designation_for_an_administrative_territorial_entity . ?i rdf:type ontology:designation_for_an_administrative_territorial_entity } GROUP BY ?w } . FILTER ( ?q = ?j ) }
[]
designation for an administrative territorial entity designation for an administrative territorial entity
Q38
SYSTEM
Italy
Q38
(c(Q15617994),P530,Q953)
action argmax
action find_tuple_counts
relation P530
type Q15617994
type Q15617994
[ANSWER] have diplomatic relationships with max number of administrative territories
[{'concept': 'Q15617994'}, 'P530', 'Q953']
SELECT DISTINCT ?w WHERE { { SELECT DISTINCT ( MAX ( ?l ) AS ?j ) { SELECT DISTINCT ?x ( COUNT ( ?c ) AS ?l ) WHERE { ?x property:P530 ?c . ?x rdf:type ontology:Q15617994 . ?c rdf:type ontology:Q15617994 } GROUP BY ?x } } . { SELECT DISTINCT ?w ( COUNT ( ?i ) AS ?q ) WHERE { ?w property:P530 ?i . ?w rdf:type ontology:Q15617994 . ?i rdf:type ontology:Q15617994 } GROUP BY ?w } . FILTER ( ?q = ?j ) }
Italy
Italy have diplomatic relationships with max number of administrative territories
Italy
action argmax
action find_tuple_counts
relation diplomatic relation
type designation for an administrative territorial entity
type designation for an administrative territorial entity
[{'concept': 'designation for an administrative territorial entity'}, 'diplomatic relation', 'Zambia']
SELECT DISTINCT ?w WHERE { { SELECT DISTINCT ( MAX ( ?l ) AS ?j ) { SELECT DISTINCT ?x ( COUNT ( ?c ) AS ?l ) WHERE { ?x property:diplomatic_relation ?c . ?x rdf:type ontology:designation_for_an_administrative_territorial_entity . ?c rdf:type ontology:designation_for_an_administrative_territorial_entity } GROUP BY ?x } } . { SELECT DISTINCT ?w ( COUNT ( ?i ) AS ?q ) WHERE { ?w property:diplomatic_relation ?i . ?w rdf:type ontology:designation_for_an_administrative_territorial_entity . ?i rdf:type ontology:designation_for_an_administrative_territorial_entity } GROUP BY ?w } . FILTER ( ?q = ?j ) }
[]