Simple Question (Direct)
Simple Question
Q22783217
P1444
Q56061
USER
Which administrative territory does 2016 Tour de Langkawi, Stage 8 finally stop at ?
(Q22783217,P1444,c(Q56061))
action filter_type
action find
entity Q22783217
relation P1444
type Q56061
['Q22783217', 'P1444', {'concept': 'Q56061'}]
SELECT DISTINCT ?o WHERE { resource:Q22783217 property:P1444 ?o . ?o rdf:type ontology:Q56061 }
2016 Tour de Langkawi, Stage 8
action filter_type
action find
entity 2016 Tour de Langkawi, Stage 8
relation destination point
type administrative territorial entity
['2016 Tour de Langkawi, Stage 8', 'destination point', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ?o WHERE { resource:2016_Tour_de_Langkawi,_Stage_8 property:destination_point ?o . ?o rdf:type ontology:administrative_territorial_entity }
[]
administrative territorial entity
Q61089
SYSTEM
Malacca City
Q61089
(Q22783217,P1444,c(Q56061))
action filter_type
action find
entity Q22783217
relation P1444
type Q56061
2016 Tour de Langkawi , Stage 8 stops at the [ANSWER] finally
['Q22783217', 'P1444', {'concept': 'Q56061'}]
SELECT DISTINCT ?o WHERE { resource:Q22783217 property:P1444 ?o . ?o rdf:type ontology:Q56061 }
Malacca City
2016 Tour de Langkawi , Stage 8 stops at the Malacca City finally
Malacca City
action filter_type
action find
entity 2016 Tour de Langkawi, Stage 8
relation destination point
type administrative territorial entity
['2016 Tour de Langkawi, Stage 8', 'destination point', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ?o WHERE { resource:2016_Tour_de_Langkawi,_Stage_8 property:destination_point ?o . ?o rdf:type ontology:administrative_territorial_entity }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q61089
P1376
Q7275
USER
Which state has that administrative territory as its capital ?
(Q61089,P1376,c(Q7275))
action filter_type
action find
entity Q61089
relation P1376
type Q7275
['Q61089', 'P1376', {'concept': 'Q7275'}]
SELECT DISTINCT ?d WHERE { ?d rdf:type ontology:Q7275 . resource:Q61089 property:P1376 ?d }
Malacca City
action filter_type
action find
entity Malacca City
relation capital of
type state
['Malacca City', 'capital of', {'concept': 'state'}]
SELECT DISTINCT ?d WHERE { ?d rdf:type ontology:state . resource:Malacca_City property:capital_of ?d }
[]
state
Q46652
SYSTEM
Malacca sultanate
Q46652
(Q61089,P1376,c(Q7275))
action filter_type
action find
entity Q61089
relation P1376
type Q7275
[ANSWER] has that administrative territory as its capital
['Q61089', 'P1376', {'concept': 'Q7275'}]
SELECT DISTINCT ?d WHERE { ?d rdf:type ontology:Q7275 . resource:Q61089 property:P1376 ?d }
Malacca sultanate
Malacca sultanate has that administrative territory as its capital
Malacca sultanate
action filter_type
action find
entity Malacca City
relation capital of
type state
['Malacca City', 'capital of', {'concept': 'state'}]
SELECT DISTINCT ?d WHERE { ?d rdf:type ontology:state . resource:Malacca_City property:capital_of ?d }
[]
Verification (Boolean) (All)
Verification|2 entities, one direct and one indirect, object is indirect
Q46652 Q891713
P1376
Q56061
USER
Is Bom Despacho, Minas Gerais center of administration for that state ?
(Q891713,P1376,Q46652)
action is_in
entity Q891713
action find
entity Q46652
relation P1376
['Q891713', 'P1376', 'Q46652']
ASK WHERE { resource:Q46652 property:P1376 resource:Q891713 }
Malacca sultanate Bom Despacho, Minas Gerais
action is_in
entity Bom Despacho, Minas Gerais
action find
entity Malacca sultanate
relation capital of
['Bom Despacho, Minas Gerais', 'capital of', 'Malacca sultanate']
ASK WHERE { resource:Malacca_sultanate property:capital_of resource:Bom_Despacho,_Minas_Gerais }
[]
administrative territorial entity
SYSTEM
NO
(Q891713,P1376,Q46652)
action is_in
entity Q891713
action find
entity Q46652
relation P1376
[ANSWER]
['Q891713', 'P1376', 'Q46652']
ASK WHERE { resource:Q46652 property:P1376 resource:Q891713 }
No
action is_in
entity Bom Despacho, Minas Gerais
action find
entity Malacca sultanate
relation capital of
['Bom Despacho, Minas Gerais', 'capital of', 'Malacca sultanate']
ASK WHERE { resource:Malacca_sultanate property:capital_of resource:Bom_Despacho,_Minas_Gerais }
[]
Verification (Boolean) (All)
Verification|3 entities, all direct, 2 are query entities
Q61089 Q789261 Q57906
P190
Q515
USER
Is Malacca City partner town of Balatonboglár and Yangzhou ?
(Q61089,P190,Q789261) (Q61089,P190,Q57906)
action is_in
entity Q61089
action intersection
action find_reverse
entity Q789261
relation P190
action find_reverse
entity Q57906
relation P190
['Q61089', 'P190', 'Q789261'] ['Q61089', 'P190', 'Q57906']
ASK WHERE { resource:Q61089 property:P190 resource:Q789261 . resource:Q61089 property:P190 resource:Q57906 }
Malacca City Balatonboglár Yangzhou
action is_in
entity Malacca City
action intersection
action find_reverse
entity Balatonboglár
relation sister city
action find_reverse
entity Yangzhou
relation sister city
['Malacca City', 'sister city', 'Balatonboglár'] ['Malacca City', 'sister city', 'Yangzhou']
ASK WHERE { resource:Malacca_City property:sister_city resource:Balatonboglár . resource:Malacca_City property:sister_city resource:Yangzhou }
[]
city
SYSTEM
NO and YES respectively
(Q61089,P190,Q789261) (Q61089,P190,Q57906)
action is_in
entity Q61089
action intersection
action find_reverse
entity Q789261
relation P190
action find_reverse
entity Q57906
relation P190
[ANSWER]
['Q61089', 'P190', 'Q789261'] ['Q61089', 'P190', 'Q57906']
ASK WHERE { resource:Q61089 property:P190 resource:Q789261 . resource:Q61089 property:P190 resource:Q57906 }
NO and YES respectively
action is_in
entity Malacca City
action intersection
action find_reverse
entity Balatonboglár
relation sister city
action find_reverse
entity Yangzhou
relation sister city
['Malacca City', 'sister city', 'Balatonboglár'] ['Malacca City', 'sister city', 'Yangzhou']
ASK WHERE { resource:Malacca_City property:sister_city resource:Balatonboglár . resource:Malacca_City property:sister_city resource:Yangzhou }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q61089
P17
Q15617994
USER
Which administrative territory does Malacca City belong to ?
(Q61089,P17,c(Q15617994))
action filter_type
action find
entity Q61089
relation P17
type Q15617994
['Q61089', 'P17', {'concept': 'Q15617994'}]
SELECT DISTINCT ?u WHERE { resource:Q61089 property:P17 ?u . ?u rdf:type ontology:Q15617994 }
Malacca City
action filter_type
action find
entity Malacca City
relation country
type designation for an administrative territorial entity
['Malacca City', 'country', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?u WHERE { resource:Malacca_City property:country ?u . ?u rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
designation for an administrative territorial entity
Q833
SYSTEM
Malaysia
Q833
(Q61089,P17,c(Q15617994))
action filter_type
action find
entity Q61089
relation P17
type Q15617994
Malacca City belongs to [ANSWER]
['Q61089', 'P17', {'concept': 'Q15617994'}]
SELECT DISTINCT ?u WHERE { resource:Q61089 property:P17 ?u . ?u rdf:type ontology:Q15617994 }
Malaysia
Malacca City belongs to Malaysia
Malaysia
action filter_type
action find
entity Malacca City
relation country
type designation for an administrative territorial entity
['Malacca City', 'country', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?u WHERE { resource:Malacca_City property:country ?u . ?u rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
Comparative Reasoning (All)
Comparative|More/Less|Single entity type
Q800
P530
Q15617994 Q15617994
USER
Which administrative territories have diplomatic relationships with greater number of administrative territories than Costa Rica ?
(c(Q15617994),P530,c(Q15617994))
action greater
action find_tuple_counts
relation P530
type Q15617994
type Q15617994
action count
action filter_type
action find
entity Q800
relation P530
type Q15617994
[{'concept': 'Q15617994'}, 'P530', {'concept': 'Q15617994'}]
SELECT DISTINCT ?z WHERE { { SELECT DISTINCT ( COUNT ( ?n ) AS ?v ) WHERE { resource:Q800 property:P530 ?n . ?n rdf:type ontology:Q15617994 } } . FILTER ( ?k > ?v ) . { SELECT DISTINCT ?z ( COUNT ( ?c ) AS ?k ) WHERE { ?z property:P530 ?c . ?c rdf:type ontology:Q15617994 . ?z rdf:type ontology:Q15617994 } GROUP BY ?z } }
Costa Rica
action greater
action find_tuple_counts
relation diplomatic relation
type designation for an administrative territorial entity
type designation for an administrative territorial entity
action count
action filter_type
action find
entity Costa Rica
relation diplomatic relation
type designation for an administrative territorial entity
[{'concept': 'designation for an administrative territorial entity'}, 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?z WHERE { { SELECT DISTINCT ( COUNT ( ?n ) AS ?v ) WHERE { resource:Costa_Rica property:diplomatic_relation ?n . ?n rdf:type ontology:designation_for_an_administrative_territorial_entity } } . FILTER ( ?k > ?v ) . { SELECT DISTINCT ?z ( COUNT ( ?c ) AS ?k ) WHERE { ?z property:diplomatic_relation ?c . ?c rdf:type ontology:designation_for_an_administrative_territorial_entity . ?z rdf:type ontology:designation_for_an_administrative_territorial_entity } GROUP BY ?z } }
[]
designation for an administrative territorial entity designation for an administrative territorial entity
Q38 Q155 Q30
SYSTEM
Italy, Brazil, United States of America
Q801 Q805 Q668 Q414 Q142 Q145 Q262 Q148 Q37 Q711 Q252 Q399 Q403 Q258 Q45 Q159 Q43 Q41 Q155 Q796 Q794 Q954 Q889 Q884 Q881 Q822 Q241 Q32 Q31 Q30 Q36 Q34 Q928 Q39 Q38 Q739 Q423 Q851 Q27 Q1049 Q843 Q228 Q227 Q224 Q222 Q347 Q17 Q974 Q1033 Q298 Q115 Q114 Q212 Q213 Q211 Q215 Q916 Q79 Q810 Q1016 Q1011 Q29 Q953
(c(Q15617994),P530,c(Q15617994))
action greater
action find_tuple_counts
relation P530
type Q15617994
type Q15617994
action count
action filter_type
action find
entity Q800
relation P530
type Q15617994
[ANSWERS] have diplomatic relationships with greater number of administrative territories than Costa Rica
[{'concept': 'Q15617994'}, 'P530', {'concept': 'Q15617994'}]
SELECT DISTINCT ?z WHERE { { SELECT DISTINCT ( COUNT ( ?n ) AS ?v ) WHERE { resource:Q800 property:P530 ?n . ?n rdf:type ontology:Q15617994 } } . FILTER ( ?k > ?v ) . { SELECT DISTINCT ?z ( COUNT ( ?c ) AS ?k ) WHERE { ?z property:P530 ?c . ?c rdf:type ontology:Q15617994 . ?z rdf:type ontology:Q15617994 } GROUP BY ?z } }
Israel Yemen India Argentina France United Kingdom Algeria People's Republic of China Lithuania Mongolia Indonesia Armenia Serbia South Africa Portugal Russia Turkey Greece Brazil Iraq Iran Zimbabwe Afghanistan South Korea Vietnam Lebanon Cuba Luxembourg Belgium United States of America Poland Sweden Philippines Switzerland Italy Colombia North Korea Saudi Arabia Ireland Sudan Pakistan Andorra Azerbaijan Croatia Albania Liechtenstein Japan Democratic Republic of the Congo Nigeria Chile Ethiopia Kenya Ukraine Czech Republic Latvia Slovenia Angola Egypt Jordan Libya Cape Verde Spain Zambia
Italy, Brazil and United States of America have diplomatic relationships with greater number of administrative territories than Costa Rica
Italy Brazil United States of America
action greater
action find_tuple_counts
relation diplomatic relation
type designation for an administrative territorial entity
type designation for an administrative territorial entity
action count
action filter_type
action find
entity Costa Rica
relation diplomatic relation
type designation for an administrative territorial entity
[{'concept': 'designation for an administrative territorial entity'}, 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?z WHERE { { SELECT DISTINCT ( COUNT ( ?n ) AS ?v ) WHERE { resource:Costa_Rica property:diplomatic_relation ?n . ?n rdf:type ontology:designation_for_an_administrative_territorial_entity } } . FILTER ( ?k > ?v ) . { SELECT DISTINCT ?z ( COUNT ( ?c ) AS ?k ) WHERE { ?z property:diplomatic_relation ?c . ?c rdf:type ontology:designation_for_an_administrative_territorial_entity . ?z rdf:type ontology:designation_for_an_administrative_territorial_entity } GROUP BY ?z } }
[]
Comparative Reasoning (All)
Comparative|More/Less|Single entity type|Incomplete
Q1013
P530
Q15617994 Q15617994
USER
And what about Lesotho?
(c(Q15617994),P530,c(Q15617994))
action greater
action find_reverse_tuple_counts
relation P530
type Q15617994
type Q15617994
action count
action filter_type
action find
entity Q1013
relation P530
type Q15617994
[{'concept': 'Q15617994'}, 'P530', {'concept': 'Q15617994'}]
SELECT DISTINCT ?n WHERE { { SELECT DISTINCT ?n ( COUNT ( ?i ) AS ?t ) WHERE { ?n rdf:type ontology:Q15617994 . ?i rdf:type ontology:Q15617994 . ?i property:P530 ?n } GROUP BY ?n } . { SELECT DISTINCT ( COUNT ( ?m ) AS ?a ) WHERE { resource:Q1013 property:P530 ?m . ?m rdf:type ontology:Q15617994 } } . FILTER ( ?t > ?a ) }
Lesotho
action greater
action find_reverse_tuple_counts
relation diplomatic relation
type designation for an administrative territorial entity
type designation for an administrative territorial entity
action count
action filter_type
action find
entity Lesotho
relation diplomatic relation
type designation for an administrative territorial entity
[{'concept': 'designation for an administrative territorial entity'}, 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?n WHERE { { SELECT DISTINCT ?n ( COUNT ( ?i ) AS ?t ) WHERE { ?n rdf:type ontology:designation_for_an_administrative_territorial_entity . ?i rdf:type ontology:designation_for_an_administrative_territorial_entity . ?i property:diplomatic_relation ?n } GROUP BY ?n } . { SELECT DISTINCT ( COUNT ( ?m ) AS ?a ) WHERE { resource:Lesotho property:diplomatic_relation ?m . ?m rdf:type ontology:designation_for_an_administrative_territorial_entity } } . FILTER ( ?t > ?a ) }
[]
designation for an administrative territorial entity designation for an administrative territorial entity
Q38 Q155 Q30
SYSTEM
Italy, Brazil, United States of America
Q801 Q800 Q805 Q419 Q668 Q414 Q142 Q55 Q145 Q262 Q148 Q37 Q711 Q717 Q252 Q399 Q398 Q403 Q258 Q45 Q159 Q43 Q41 Q155 Q796 Q794 Q954 Q889 Q884 Q958 Q881 Q822 Q241 Q33 Q32 Q31 Q30 Q924 Q36 Q34 Q928 Q39 Q38 Q739 Q423 Q983 Q851 Q733 Q734 Q236 Q230 Q233 Q27 Q28 Q1049 Q189 Q843 Q184 Q1029 Q736 Q228 Q227 Q225 Q224 Q222 Q221 Q96 Q229 Q347 Q17 Q902 Q974 Q1033 Q1030 Q191 Q963 Q298 Q115 Q114 Q750 Q212 Q213 Q211 Q217 Q214 Q215 Q219 Q916 Q1009 Q1008 Q971 Q874 Q79 Q77 Q858 Q878 Q810 Q1016 Q1011 Q29 Q869 Q953
(c(Q15617994),P530,c(Q15617994))
action greater
action find_reverse_tuple_counts
relation P530
type Q15617994
type Q15617994
action count
action filter_type
action find
entity Q1013
relation P530
type Q15617994
[ANSWERS]
[{'concept': 'Q15617994'}, 'P530', {'concept': 'Q15617994'}]
SELECT DISTINCT ?n WHERE { { SELECT DISTINCT ?n ( COUNT ( ?i ) AS ?t ) WHERE { ?n rdf:type ontology:Q15617994 . ?i rdf:type ontology:Q15617994 . ?i property:P530 ?n } GROUP BY ?n } . { SELECT DISTINCT ( COUNT ( ?m ) AS ?a ) WHERE { resource:Q1013 property:P530 ?m . ?m rdf:type ontology:Q15617994 } } . FILTER ( ?t > ?a ) }
Israel Costa Rica Yemen Peru India Argentina France Netherlands United Kingdom Algeria People's Republic of China Lithuania Mongolia Venezuela Indonesia Armenia Bahrain Serbia South Africa Portugal Russia Turkey Greece Brazil Iraq Iran Zimbabwe Afghanistan South Korea South Sudan Vietnam Lebanon Cuba Finland Luxembourg Belgium United States of America Tanzania Poland Sweden Philippines Switzerland Italy Colombia North Korea Equatorial Guinea Saudi Arabia Paraguay Guyana Montenegro Georgia Malta Ireland Hungary Sudan Iceland Pakistan Belarus Mozambique Ecuador Andorra Azerbaijan Bosnia and Herzegovina Croatia Albania Republic of Macedonia Mexico Cyprus Liechtenstein Japan Bangladesh Democratic Republic of the Congo Nigeria Namibia Estonia Botswana Chile Ethiopia Kenya Bolivia Ukraine Czech Republic Latvia Republic of Moldova Slovakia Slovenia Bulgaria Angola Cameroon Côte d'Ivoire Republic of the Congo Turkmenistan Egypt Uruguay Syria United Arab Emirates Jordan Libya Cape Verde Spain Thailand Zambia
Italy Brazil United States of America
action greater
action find_reverse_tuple_counts
relation diplomatic relation
type designation for an administrative territorial entity
type designation for an administrative territorial entity
action count
action filter_type
action find
entity Lesotho
relation diplomatic relation
type designation for an administrative territorial entity
[{'concept': 'designation for an administrative territorial entity'}, 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?n WHERE { { SELECT DISTINCT ?n ( COUNT ( ?i ) AS ?t ) WHERE { ?n rdf:type ontology:designation_for_an_administrative_territorial_entity . ?i rdf:type ontology:designation_for_an_administrative_territorial_entity . ?i property:diplomatic_relation ?n } GROUP BY ?n } . { SELECT DISTINCT ( COUNT ( ?m ) AS ?a ) WHERE { resource:Lesotho property:diplomatic_relation ?m . ?m rdf:type ontology:designation_for_an_administrative_territorial_entity } } . FILTER ( ?t > ?a ) }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P1376
Q7275 Q515 Q56061
USER
Which states have max number of cities and administrative territories as their capital ?
(c(Q515)|c(Q56061),P1376,c(Q7275))
action argmax
action union
action find_reverse_tuple_counts
relation P1376
type Q7275
type Q515
action find_reverse_tuple_counts
relation P1376
type Q7275
type Q56061
[[{'concept': 'Q515'}, {'concept': 'Q56061'}], 'P1376', {'concept': 'Q7275'}]
SELECT DISTINCT ?g WHERE { { SELECT DISTINCT ( MAX ( ?b ) AS ?k ) { SELECT DISTINCT ?j ( COUNT ( ?t ) AS ?b ) WHERE { VALUES ( ?c ) { ( ontology:Q515 ) ( ontology:Q56061 ) } . ?t rdf:type ?c } GROUP BY ?j } } . { SELECT DISTINCT ?g ( COUNT ( ?p ) AS ?a ) WHERE { { ?p property:P1376 ?g . ?g rdf:type ontology:Q7275 . ?p rdf:type ontology:Q515 } UNION { ?g rdf:type ontology:Q7275 . ?p rdf:type ontology:Q56061 . ?p property:P1376 ?g } } GROUP BY ?g } . FILTER ( ?a = ?k ) }
action argmax
action union
action find_reverse_tuple_counts
relation capital of
type state
type city
action find_reverse_tuple_counts
relation capital of
type state
type administrative territorial entity
[[{'concept': 'city'}, {'concept': 'administrative territorial entity'}], 'capital of', {'concept': 'state'}]
SELECT DISTINCT ?g WHERE { { SELECT DISTINCT ( MAX ( ?b ) AS ?k ) { SELECT DISTINCT ?j ( COUNT ( ?t ) AS ?b ) WHERE { VALUES ( ?c ) { ( ontology:city ) ( ontology:administrative_territorial_entity ) } . ?t rdf:type ?c } GROUP BY ?j } } . { SELECT DISTINCT ?g ( COUNT ( ?p ) AS ?a ) WHERE { { ?p property:capital_of ?g . ?g rdf:type ontology:state . ?p rdf:type ontology:city } UNION { ?g rdf:type ontology:state . ?p rdf:type ontology:administrative_territorial_entity . ?p property:capital_of ?g } } GROUP BY ?g } . FILTER ( ?a = ?k ) }
[]
state city administrative territorial entity
Q188586
SYSTEM
Kingdom of Sicily
Q188586
(c(Q515)|c(Q56061),P1376,c(Q7275))
action argmax
action union
action find_reverse_tuple_counts
relation P1376
type Q7275
type Q515
action find_reverse_tuple_counts
relation P1376
type Q7275
type Q56061
[ANSWER] have max number of cities and administrative territories as their capital
[[{'concept': 'Q515'}, {'concept': 'Q56061'}], 'P1376', {'concept': 'Q7275'}]
SELECT DISTINCT ?g WHERE { { SELECT DISTINCT ( MAX ( ?b ) AS ?k ) { SELECT DISTINCT ?j ( COUNT ( ?t ) AS ?b ) WHERE { VALUES ( ?c ) { ( ontology:Q515 ) ( ontology:Q56061 ) } . ?t rdf:type ?c } GROUP BY ?j } } . { SELECT DISTINCT ?g ( COUNT ( ?p ) AS ?a ) WHERE { { ?p property:P1376 ?g . ?g rdf:type ontology:Q7275 . ?p rdf:type ontology:Q515 } UNION { ?g rdf:type ontology:Q7275 . ?p rdf:type ontology:Q56061 . ?p property:P1376 ?g } } GROUP BY ?g } . FILTER ( ?a = ?k ) }
Kingdom of Sicily
Kingdom of Sicily have max number of cities and administrative territories as their capital
Kingdom of Sicily
action argmax
action union
action find_reverse_tuple_counts
relation capital of
type state
type city
action find_reverse_tuple_counts
relation capital of
type state
type administrative territorial entity
[[{'concept': 'city'}, {'concept': 'administrative territorial entity'}], 'capital of', {'concept': 'state'}]
SELECT DISTINCT ?g WHERE { { SELECT DISTINCT ( MAX ( ?b ) AS ?k ) { SELECT DISTINCT ?j ( COUNT ( ?t ) AS ?b ) WHERE { VALUES ( ?c ) { ( ontology:city ) ( ontology:administrative_territorial_entity ) } . ?t rdf:type ?c } GROUP BY ?j } } . { SELECT DISTINCT ?g ( COUNT ( ?p ) AS ?a ) WHERE { { ?p property:capital_of ?g . ?g rdf:type ontology:state . ?p rdf:type ontology:city } UNION { ?g rdf:type ontology:state . ?p rdf:type ontology:administrative_territorial_entity . ?p property:capital_of ?g } } GROUP BY ?g } . FILTER ( ?a = ?k ) }
[]