Simple Question (Direct)
Simple Question
Q6130319
P21
Q290
USER
Which sex does James Brown possess ?
(Q6130319,P21,c(Q290))
action filter_type
action find
entity Q6130319
relation P21
type Q290
['Q6130319', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ?i WHERE { resource:Q6130319 property:P21 ?i . ?i rdf:type ontology:Q290 }
James Brown
action filter_type
action find
entity James Brown
relation gender
type sex
['James Brown', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ?i WHERE { resource:James_Brown property:gender ?i . ?i rdf:type ontology:sex }
[]
sex
Q6581097
SYSTEM
male
Q6581097
(Q6130319,P21,c(Q290))
action filter_type
action find
entity Q6130319
relation P21
type Q290
James Brown possesses a [ANSWER]
['Q6130319', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ?i WHERE { resource:Q6130319 property:P21 ?i . ?i rdf:type ontology:Q290 }
male
James Brown possesses a male
male
action filter_type
action find
entity James Brown
relation gender
type sex
['James Brown', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ?i WHERE { resource:James_Brown property:gender ?i . ?i rdf:type ontology:sex }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q6130319
P39
Q12737077
USER
What was the position held by James Brown ?
(Q6130319,P39,c(Q12737077))
action filter_type
action find
entity Q6130319
relation P39
type Q12737077
['Q6130319', 'P39', {'concept': 'Q12737077'}]
SELECT DISTINCT ?a WHERE { resource:Q6130319 property:P39 ?a . ?a rdf:type ontology:Q12737077 }
James Brown
action filter_type
action find
entity James Brown
relation position held
type occupation
['James Brown', 'position held', {'concept': 'occupation'}]
SELECT DISTINCT ?a WHERE { resource:James_Brown property:position_held ?a . ?a rdf:type ontology:occupation }
[]
occupation
Q16707842
SYSTEM
Member of Parliament in the United Kingdom
Q16707842
(Q6130319,P39,c(Q12737077))
action filter_type
action find
entity Q6130319
relation P39
type Q12737077
The position held by James Brown was a [ANSWER]
['Q6130319', 'P39', {'concept': 'Q12737077'}]
SELECT DISTINCT ?a WHERE { resource:Q6130319 property:P39 ?a . ?a rdf:type ontology:Q12737077 }
Member of Parliament in the United Kingdom
The position held by James Brown was a Member of Parliament in the United Kingdom
Member of Parliament in the United Kingdom
action filter_type
action find
entity James Brown
relation position held
type occupation
['James Brown', 'position held', {'concept': 'occupation'}]
SELECT DISTINCT ?a WHERE { resource:James_Brown property:position_held ?a . ?a rdf:type ontology:occupation }
[]
Logical Reasoning (All)
Logical|Union|Multiple_Relation
Q7903 Q6130319
P190 P937
Q56061
USER
Which administrative territories are the work locations of James Brown or are twin cities of Casablanca ?
OR((Q6130319,P937,c(Q56061)), (Q7903,P190,c(Q56061)))
action filter_type
action union
action find
entity Q6130319
relation P937
action find
entity Q7903
relation P190
type Q56061
{'OR': [['Q6130319', 'P937', {'concept': 'Q56061'}], ['Q7903', 'P190', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?o WHERE { { { resource:Q6130319 property:P937 ?o } UNION { resource:Q7903 property:P190 ?o } } . ?o rdf:type ontology:Q56061 }
Casablanca James Brown
action filter_type
action union
action find
entity James Brown
relation work location
action find
entity Casablanca
relation sister city
type administrative territorial entity
{'OR': [['James Brown', 'work location', {'concept': 'administrative territorial entity'}], ['Casablanca', 'sister city', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?o WHERE { { { resource:James_Brown property:work_location ?o } UNION { resource:Casablanca property:sister_city ?o } } . ?o rdf:type ontology:administrative_territorial_entity }
[]
administrative territorial entity
Q84 Q340 Q126148 Q8686 Q1297 Q1524 Q85 Q3630 Q1479 Q3561
SYSTEM
Some of them are London, Montreal, Tangier, Shanghai, Chicago, Athens, Cairo, Jakarta, Bordeaux, Algiers
Q8686 Q3630 Q340 Q8678 Q3561 Q1524 Q193445 Q597 Q126148 Q87 Q84 Q85 Q1490 Q1297 Q406 Q1479
OR((Q6130319,P937,c(Q56061)), (Q7903,P190,c(Q56061)))
action filter_type
action union
action find
entity Q6130319
relation P937
action find
entity Q7903
relation P190
type Q56061
[ANSWERS] are the work locations of James Brown or are twin cities of Casablanca
{'OR': [['Q6130319', 'P937', {'concept': 'Q56061'}], ['Q7903', 'P190', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?o WHERE { { { resource:Q6130319 property:P937 ?o } UNION { resource:Q7903 property:P190 ?o } } . ?o rdf:type ontology:Q56061 }
Shanghai Jakarta Montreal Rio de Janeiro Algiers Athens Artvin Lisbon Tangier Alexandria London Cairo Tokyo Chicago Istanbul Bordeaux
London, Montreal, Tangier, Shanghai, Chicago, Athens, Cairo, Jakarta, Bordeaux and Algiers are the work locations of James Brown or are twin cities of Casablanca
London Montreal Tangier Shanghai Chicago Athens Cairo Jakarta Bordeaux Algiers
action filter_type
action union
action find
entity James Brown
relation work location
action find
entity Casablanca
relation sister city
type administrative territorial entity
{'OR': [['James Brown', 'work location', {'concept': 'administrative territorial entity'}], ['Casablanca', 'sister city', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?o WHERE { { { resource:James_Brown property:work_location ?o } UNION { resource:Casablanca property:sister_city ?o } } . ?o rdf:type ontology:administrative_territorial_entity }
[]
Clarification
Quantitative|Count|Logical operators|Indirect
P190
Q19953632 Q19833031
USER
How many former administrative territories or emirates of the United Arab Emirates are twin towns of that administrative territory ?
(Q8686,P190,c(Q19953632)) (Q8686,P190,c(Q19833031)) (Q84,P190,c(Q19953632)) (Q84,P190,c(Q19833031)) (Q340,P190,c(Q19953632)) (Q340,P190,c(Q19833031)) (Q126148,P190,c(Q19953632)) (Q126148,P190,c(Q19833031)) (Q8686,P190,c(Q19953632)) (Q8686,P190,c(Q19833031)) (Q1297,P190,c(Q19953632)) (Q1297,P190,c(Q19833031)) (Q1524,P190,c(Q19953632)) (Q1524,P190,c(Q19833031)) (Q85,P190,c(Q19953632)) (Q85,P190,c(Q19833031)) (Q3630,P190,c(Q19953632)) (Q3630,P190,c(Q19833031)) (Q1479,P190,c(Q19953632)) (Q1479,P190,c(Q19833031)) (Q3561,P190,c(Q19953632)) (Q3561,P190,c(Q19833031))
['Q8686', 'P190', {'concept': 'Q19953632'}] ['Q8686', 'P190', {'concept': 'Q19833031'}] ['Q84', 'P190', {'concept': 'Q19953632'}] ['Q84', 'P190', {'concept': 'Q19833031'}] ['Q340', 'P190', {'concept': 'Q19953632'}] ['Q340', 'P190', {'concept': 'Q19833031'}] ['Q126148', 'P190', {'concept': 'Q19953632'}] ['Q126148', 'P190', {'concept': 'Q19833031'}] ['Q8686', 'P190', {'concept': 'Q19953632'}] ['Q8686', 'P190', {'concept': 'Q19833031'}] ['Q1297', 'P190', {'concept': 'Q19953632'}] ['Q1297', 'P190', {'concept': 'Q19833031'}] ['Q1524', 'P190', {'concept': 'Q19953632'}] ['Q1524', 'P190', {'concept': 'Q19833031'}] ['Q85', 'P190', {'concept': 'Q19953632'}] ['Q85', 'P190', {'concept': 'Q19833031'}] ['Q3630', 'P190', {'concept': 'Q19953632'}] ['Q3630', 'P190', {'concept': 'Q19833031'}] ['Q1479', 'P190', {'concept': 'Q19953632'}] ['Q1479', 'P190', {'concept': 'Q19833031'}] ['Q3561', 'P190', {'concept': 'Q19953632'}] ['Q3561', 'P190', {'concept': 'Q19833031'}]
SELECT DISTINCT ( COUNT ( ?z ) AS ?x ) WHERE { { { resource:Q7488397 property:P190 ?z } UNION { resource:Q7488397 property:P190 ?y } UNION { resource:Q1281978 property:P190 ?z } UNION { resource:Q1281978 property:P190 ?y } UNION { resource:Q1529343 property:P190 ?z } UNION { resource:Q1529343 property:P190 ?y } UNION { resource:Q126148 property:P190 ?z } UNION { resource:Q126148 property:P190 ?y } UNION { resource:Q7488397 property:P190 ?z } UNION { resource:Q7488397 property:P190 ?y } UNION { resource:Q3100493 property:P190 ?z } UNION { resource:Q3100493 property:P190 ?y } UNION { resource:Q4813446 property:P190 ?z } UNION { resource:Q4813446 property:P190 ?y } UNION { resource:Q2456665 property:P190 ?z } UNION { resource:Q2456665 property:P190 ?y } UNION { resource:Q4177898 property:P190 ?z } UNION { resource:Q4177898 property:P190 ?y } UNION { resource:Q26614162 property:P190 ?z } UNION { resource:Q26614162 property:P190 ?y } UNION { resource:Q1414527 property:P190 ?z } UNION { resource:Q1414527 property:P190 ?y } } . ?z rdf:type ontology:Q19953632 . ?y rdf:type ontology:Q19833031 }
['Shanghai', 'sister city', {'concept': 'former administrative territorial entity'}] ['Shanghai', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['London', 'sister city', {'concept': 'former administrative territorial entity'}] ['London', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Montreal', 'sister city', {'concept': 'former administrative territorial entity'}] ['Montreal', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Tangier', 'sister city', {'concept': 'former administrative territorial entity'}] ['Tangier', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Shanghai', 'sister city', {'concept': 'former administrative territorial entity'}] ['Shanghai', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Chicago', 'sister city', {'concept': 'former administrative territorial entity'}] ['Chicago', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Athens', 'sister city', {'concept': 'former administrative territorial entity'}] ['Athens', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Cairo', 'sister city', {'concept': 'former administrative territorial entity'}] ['Cairo', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Jakarta', 'sister city', {'concept': 'former administrative territorial entity'}] ['Jakarta', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Bordeaux', 'sister city', {'concept': 'former administrative territorial entity'}] ['Bordeaux', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Algiers', 'sister city', {'concept': 'former administrative territorial entity'}] ['Algiers', 'sister city', {'concept': 'emirate of the United Arab Emirates'}]
SELECT DISTINCT ( COUNT ( ?z ) AS ?x ) WHERE { { { resource:Shanghai property:sister_city ?z } UNION { resource:Shanghai property:sister_city ?y } UNION { resource:London property:sister_city ?z } UNION { resource:London property:sister_city ?y } UNION { resource:Montreal property:sister_city ?z } UNION { resource:Montreal property:sister_city ?y } UNION { resource:Tangier property:sister_city ?z } UNION { resource:Tangier property:sister_city ?y } UNION { resource:Shanghai property:sister_city ?z } UNION { resource:Shanghai property:sister_city ?y } UNION { resource:Chicago property:sister_city ?z } UNION { resource:Chicago property:sister_city ?y } UNION { resource:Athens property:sister_city ?z } UNION { resource:Athens property:sister_city ?y } UNION { resource:Cairo property:sister_city ?z } UNION { resource:Cairo property:sister_city ?y } UNION { resource:Jakarta property:sister_city ?z } UNION { resource:Jakarta property:sister_city ?y } UNION { resource:Bordeaux property:sister_city ?z } UNION { resource:Bordeaux property:sister_city ?y } UNION { resource:Algiers property:sister_city ?z } UNION { resource:Algiers property:sister_city ?y } } . ?z rdf:type ontology:former_administrative_territorial_entity . ?y rdf:type ontology:emirate_of_the_United_Arab_Emirates }
[]
former administrative territorial entity emirate of the United Arab Emirates
Quantitative|Count|Mult. entity type|Clarification
Q3561
SYSTEM
Did you mean Algiers ?
[ANSWER]
SELECT DISTINCT ( COUNT ( ?z ) AS ?x ) WHERE { { { resource:Q7488397 property:P190 ?z } UNION { resource:Q7488397 property:P190 ?y } UNION { resource:Q1281978 property:P190 ?z } UNION { resource:Q1281978 property:P190 ?y } UNION { resource:Q1529343 property:P190 ?z } UNION { resource:Q1529343 property:P190 ?y } UNION { resource:Q126148 property:P190 ?z } UNION { resource:Q126148 property:P190 ?y } UNION { resource:Q7488397 property:P190 ?z } UNION { resource:Q7488397 property:P190 ?y } UNION { resource:Q3100493 property:P190 ?z } UNION { resource:Q3100493 property:P190 ?y } UNION { resource:Q4813446 property:P190 ?z } UNION { resource:Q4813446 property:P190 ?y } UNION { resource:Q2456665 property:P190 ?z } UNION { resource:Q2456665 property:P190 ?y } UNION { resource:Q4177898 property:P190 ?z } UNION { resource:Q4177898 property:P190 ?y } UNION { resource:Q26614162 property:P190 ?z } UNION { resource:Q26614162 property:P190 ?y } UNION { resource:Q1414527 property:P190 ?z } UNION { resource:Q1414527 property:P190 ?y } } . ?z rdf:type ontology:Q19953632 . ?y rdf:type ontology:Q19833031 }
Did you mean Algiers ?
Algiers
SELECT DISTINCT ( COUNT ( ?z ) AS ?x ) WHERE { { { resource:Shanghai property:sister_city ?z } UNION { resource:Shanghai property:sister_city ?y } UNION { resource:London property:sister_city ?z } UNION { resource:London property:sister_city ?y } UNION { resource:Montreal property:sister_city ?z } UNION { resource:Montreal property:sister_city ?y } UNION { resource:Tangier property:sister_city ?z } UNION { resource:Tangier property:sister_city ?y } UNION { resource:Shanghai property:sister_city ?z } UNION { resource:Shanghai property:sister_city ?y } UNION { resource:Chicago property:sister_city ?z } UNION { resource:Chicago property:sister_city ?y } UNION { resource:Athens property:sister_city ?z } UNION { resource:Athens property:sister_city ?y } UNION { resource:Cairo property:sister_city ?z } UNION { resource:Cairo property:sister_city ?y } UNION { resource:Jakarta property:sister_city ?z } UNION { resource:Jakarta property:sister_city ?y } UNION { resource:Bordeaux property:sister_city ?z } UNION { resource:Bordeaux property:sister_city ?y } UNION { resource:Algiers property:sister_city ?z } UNION { resource:Algiers property:sister_city ?y } } . ?z rdf:type ontology:former_administrative_territorial_entity . ?y rdf:type ontology:emirate_of_the_United_Arab_Emirates }
[]
Quantitative Reasoning (Count) (All)
USER
No, I meant Shanghai. Could you tell me the answer for that?
(Q8686,P190,c(Q19953632)) (Q8686,P190,c(Q19833031)) (Q84,P190,c(Q19953632)) (Q84,P190,c(Q19833031)) (Q340,P190,c(Q19953632)) (Q340,P190,c(Q19833031)) (Q126148,P190,c(Q19953632)) (Q126148,P190,c(Q19833031)) (Q8686,P190,c(Q19953632)) (Q8686,P190,c(Q19833031)) (Q1297,P190,c(Q19953632)) (Q1297,P190,c(Q19833031)) (Q1524,P190,c(Q19953632)) (Q1524,P190,c(Q19833031)) (Q85,P190,c(Q19953632)) (Q85,P190,c(Q19833031)) (Q3630,P190,c(Q19953632)) (Q3630,P190,c(Q19833031)) (Q1479,P190,c(Q19953632)) (Q1479,P190,c(Q19833031)) (Q3561,P190,c(Q19953632)) (Q3561,P190,c(Q19833031))
Q8686
['Q8686', 'P190', {'concept': 'Q19953632'}] ['Q8686', 'P190', {'concept': 'Q19833031'}] ['Q84', 'P190', {'concept': 'Q19953632'}] ['Q84', 'P190', {'concept': 'Q19833031'}] ['Q340', 'P190', {'concept': 'Q19953632'}] ['Q340', 'P190', {'concept': 'Q19833031'}] ['Q126148', 'P190', {'concept': 'Q19953632'}] ['Q126148', 'P190', {'concept': 'Q19833031'}] ['Q8686', 'P190', {'concept': 'Q19953632'}] ['Q8686', 'P190', {'concept': 'Q19833031'}] ['Q1297', 'P190', {'concept': 'Q19953632'}] ['Q1297', 'P190', {'concept': 'Q19833031'}] ['Q1524', 'P190', {'concept': 'Q19953632'}] ['Q1524', 'P190', {'concept': 'Q19833031'}] ['Q85', 'P190', {'concept': 'Q19953632'}] ['Q85', 'P190', {'concept': 'Q19833031'}] ['Q3630', 'P190', {'concept': 'Q19953632'}] ['Q3630', 'P190', {'concept': 'Q19833031'}] ['Q1479', 'P190', {'concept': 'Q19953632'}] ['Q1479', 'P190', {'concept': 'Q19833031'}] ['Q3561', 'P190', {'concept': 'Q19953632'}] ['Q3561', 'P190', {'concept': 'Q19833031'}]
['Shanghai', 'sister city', {'concept': 'former administrative territorial entity'}] ['Shanghai', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['London', 'sister city', {'concept': 'former administrative territorial entity'}] ['London', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Montreal', 'sister city', {'concept': 'former administrative territorial entity'}] ['Montreal', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Tangier', 'sister city', {'concept': 'former administrative territorial entity'}] ['Tangier', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Shanghai', 'sister city', {'concept': 'former administrative territorial entity'}] ['Shanghai', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Chicago', 'sister city', {'concept': 'former administrative territorial entity'}] ['Chicago', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Athens', 'sister city', {'concept': 'former administrative territorial entity'}] ['Athens', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Cairo', 'sister city', {'concept': 'former administrative territorial entity'}] ['Cairo', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Jakarta', 'sister city', {'concept': 'former administrative territorial entity'}] ['Jakarta', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Bordeaux', 'sister city', {'concept': 'former administrative territorial entity'}] ['Bordeaux', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Algiers', 'sister city', {'concept': 'former administrative territorial entity'}] ['Algiers', 'sister city', {'concept': 'emirate of the United Arab Emirates'}]
[]
SYSTEM
2
Q613 Q463
(Q8686,P190,c(Q19953632)) (Q8686,P190,c(Q19833031)) (Q84,P190,c(Q19953632)) (Q84,P190,c(Q19833031)) (Q340,P190,c(Q19953632)) (Q340,P190,c(Q19833031)) (Q126148,P190,c(Q19953632)) (Q126148,P190,c(Q19833031)) (Q8686,P190,c(Q19953632)) (Q8686,P190,c(Q19833031)) (Q1297,P190,c(Q19953632)) (Q1297,P190,c(Q19833031)) (Q1524,P190,c(Q19953632)) (Q1524,P190,c(Q19833031)) (Q85,P190,c(Q19953632)) (Q85,P190,c(Q19833031)) (Q3630,P190,c(Q19953632)) (Q3630,P190,c(Q19833031)) (Q1479,P190,c(Q19953632)) (Q1479,P190,c(Q19833031)) (Q3561,P190,c(Q19953632)) (Q3561,P190,c(Q19833031))
[ANSWER]
['Q8686', 'P190', {'concept': 'Q19953632'}] ['Q8686', 'P190', {'concept': 'Q19833031'}] ['Q84', 'P190', {'concept': 'Q19953632'}] ['Q84', 'P190', {'concept': 'Q19833031'}] ['Q340', 'P190', {'concept': 'Q19953632'}] ['Q340', 'P190', {'concept': 'Q19833031'}] ['Q126148', 'P190', {'concept': 'Q19953632'}] ['Q126148', 'P190', {'concept': 'Q19833031'}] ['Q8686', 'P190', {'concept': 'Q19953632'}] ['Q8686', 'P190', {'concept': 'Q19833031'}] ['Q1297', 'P190', {'concept': 'Q19953632'}] ['Q1297', 'P190', {'concept': 'Q19833031'}] ['Q1524', 'P190', {'concept': 'Q19953632'}] ['Q1524', 'P190', {'concept': 'Q19833031'}] ['Q85', 'P190', {'concept': 'Q19953632'}] ['Q85', 'P190', {'concept': 'Q19833031'}] ['Q3630', 'P190', {'concept': 'Q19953632'}] ['Q3630', 'P190', {'concept': 'Q19833031'}] ['Q1479', 'P190', {'concept': 'Q19953632'}] ['Q1479', 'P190', {'concept': 'Q19833031'}] ['Q3561', 'P190', {'concept': 'Q19953632'}] ['Q3561', 'P190', {'concept': 'Q19833031'}]
SELECT DISTINCT ( COUNT ( ?z ) AS ?x ) WHERE { { { resource:Q7488397 property:P190 ?z } UNION { resource:Q7488397 property:P190 ?y } UNION { resource:Q1281978 property:P190 ?z } UNION { resource:Q1281978 property:P190 ?y } UNION { resource:Q1529343 property:P190 ?z } UNION { resource:Q1529343 property:P190 ?y } UNION { resource:Q126148 property:P190 ?z } UNION { resource:Q126148 property:P190 ?y } UNION { resource:Q7488397 property:P190 ?z } UNION { resource:Q7488397 property:P190 ?y } UNION { resource:Q3100493 property:P190 ?z } UNION { resource:Q3100493 property:P190 ?y } UNION { resource:Q4813446 property:P190 ?z } UNION { resource:Q4813446 property:P190 ?y } UNION { resource:Q2456665 property:P190 ?z } UNION { resource:Q2456665 property:P190 ?y } UNION { resource:Q4177898 property:P190 ?z } UNION { resource:Q4177898 property:P190 ?y } UNION { resource:Q26614162 property:P190 ?z } UNION { resource:Q26614162 property:P190 ?y } UNION { resource:Q1414527 property:P190 ?z } UNION { resource:Q1414527 property:P190 ?y } } . ?z rdf:type ontology:Q19953632 . ?y rdf:type ontology:Q19833031 }
Emirate of Dubai Rhône-Alpes
2
['Shanghai', 'sister city', {'concept': 'former administrative territorial entity'}] ['Shanghai', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['London', 'sister city', {'concept': 'former administrative territorial entity'}] ['London', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Montreal', 'sister city', {'concept': 'former administrative territorial entity'}] ['Montreal', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Tangier', 'sister city', {'concept': 'former administrative territorial entity'}] ['Tangier', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Shanghai', 'sister city', {'concept': 'former administrative territorial entity'}] ['Shanghai', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Chicago', 'sister city', {'concept': 'former administrative territorial entity'}] ['Chicago', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Athens', 'sister city', {'concept': 'former administrative territorial entity'}] ['Athens', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Cairo', 'sister city', {'concept': 'former administrative territorial entity'}] ['Cairo', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Jakarta', 'sister city', {'concept': 'former administrative territorial entity'}] ['Jakarta', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Bordeaux', 'sister city', {'concept': 'former administrative territorial entity'}] ['Bordeaux', 'sister city', {'concept': 'emirate of the United Arab Emirates'}] ['Algiers', 'sister city', {'concept': 'former administrative territorial entity'}] ['Algiers', 'sister city', {'concept': 'emirate of the United Arab Emirates'}]
SELECT DISTINCT ( COUNT ( ?z ) AS ?x ) WHERE { { { resource:Shanghai property:sister_city ?z } UNION { resource:Shanghai property:sister_city ?y } UNION { resource:London property:sister_city ?z } UNION { resource:London property:sister_city ?y } UNION { resource:Montreal property:sister_city ?z } UNION { resource:Montreal property:sister_city ?y } UNION { resource:Tangier property:sister_city ?z } UNION { resource:Tangier property:sister_city ?y } UNION { resource:Shanghai property:sister_city ?z } UNION { resource:Shanghai property:sister_city ?y } UNION { resource:Chicago property:sister_city ?z } UNION { resource:Chicago property:sister_city ?y } UNION { resource:Athens property:sister_city ?z } UNION { resource:Athens property:sister_city ?y } UNION { resource:Cairo property:sister_city ?z } UNION { resource:Cairo property:sister_city ?y } UNION { resource:Jakarta property:sister_city ?z } UNION { resource:Jakarta property:sister_city ?y } UNION { resource:Bordeaux property:sister_city ?z } UNION { resource:Bordeaux property:sister_city ?y } UNION { resource:Algiers property:sister_city ?z } UNION { resource:Algiers property:sister_city ?y } } . ?z rdf:type ontology:former_administrative_territorial_entity . ?y rdf:type ontology:emirate_of_the_United_Arab_Emirates }
[]