query-7e28f8df023fdc1969dfacaa7dbf20ba
Propertiesinstance of (P31)continent (P30)contains the administrative territorial entity (P150)locator map image (P242)flag image (P41)capital (P36)image (P18)population (P1082)head of government (P6)twinned administrative body (P190)inception (P571)located in or next to body of water (P206)has part(s) (P527) Propertiesinstance of (P31)continent (P30)contains the administrative territorial entity (P150)locator map image (P242)flag image (P41)capital (P36)image (P18)population (P1082)head of government (P6)twinned administrative body (P190)inception (P571)located in or next to body of water (P206)has part(s) (P527) Propertiesinstance of (P31)continent (P30)contains the administrative territorial entity (P150)locator map image (P242)flag image (P41)capital (P36)image (P18)population (P1082)head of government (P6)twinned administrative body (P190)inception (P571)located in or next to body of water (P206)has part(s) (P527) Propertiesinstance of (P31)continent (P30)contains the administrative territorial entity (P150)locator map image (P242)flag image (P41)capital (P36)image (P18)population (P1082)head of government (P6)twinned administrative body (P190)inception (P571)located in or next to body of water (P206)has part(s) (P527) Propertiesinstance of (P31)continent (P30)contains the administrative territorial entity (P150)locator map image (P242)flag image (P41)capital (P36)image (P18)population (P1082)head of government (P6)twinned administrative body (P190)inception (P571)located in or next to body of water (P206)has part(s) (P527) Propertiesinstance of (P31)continent (P30)contains the administrative territorial entity (P150)locator map image (P242)flag image (P41)capital (P36)image (P18)population (P1082)head of government (P6)twinned administrative body (P190)inception (P571)located in or next to body of water (P206)has part(s) (P527) Propertiesinstance of (P31)continent (P30)contains the administrative territorial entity (P150)locator map image (P242)flag image (P41)capital (P36)image (P18)population (P1082)head of government (P6)twinned administrative body (P190)inception (P571)located in or next to body of water (P206)has part(s) (P527) Propertiesinstance of (P31)continent (P30)contains the administrative territorial entity (P150)locator map image (P242)flag image (P41)capital (P36)image (P18)population (P1082)head of government (P6)twinned administrative body (P190)inception (P571)located in or next to body of water (P206)has part(s) (P527) Propertiesinstance of (P31)continent (P30)contains the administrative territorial entity (P150)locator map image (P242)flag image (P41)capital (P36)image (P18)population (P1082)head of government (P6)twinned administrative body (P190)inception (P571)located in or next to body of water (P206)has part(s) (P527) Propertiesinstance of (P31)continent (P30)contains the administrative territorial entity (P150)locator map image (P242)flag image (P41)capital (P36)image (P18)population (P1082)head of government (P6)twinned administrative body (P190)inception (P571)located in or next to body of water (P206)has part(s) (P527)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Tree
SELECT ?continent ?continentFlag ?continentLabel ?country ?countryLabel ?countryFlag ?region ?regionLabel ?regionFlag ?city ?cityLabel ?cityImage ?property ?propertyLabel ?value ?valueLabel WHERE {
{
SELECT * WHERE {
?continent wdt:P31 wd:Q5107.
?country wdt:P30 ?continent.
?country p:P31/ps:P31 wd:Q6256.
?country wdt:P150 ?region.
OPTIONAL {
?continent wdt:P242 ?continentFlag.
?country wdt:P41 ?countryFlag.
?region wdt:P41 ?regionFlag.
}
OPTIONAL {
?region wdt:P36 ?city.
?city wdt:P31 wd:Q515.
?city wdt:P18 ?cityImage.
OPTIONAL {
VALUES (?prop) {
(wdt:P1082)
(wdt:P6)
(wdt:P190)
(wdt:P31)
(wdt:P571)
(wdt:P150)
(wdt:P206)
(wdt:P527)
}
?city ?prop ?value.
?property ?ref ?prop.
?property rdf:type wikibase:Property.
}
}
}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/en
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/es
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/fr
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/hy
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/ja
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/nl
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/sv
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/tr
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/uk
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/zh