query-e5422452e26fb9d8493890a5f524d6f2
Cities that have an Armenian sister city SELECT ?item ?itemLabel ?sisterCity ?sisterCityLabel ?coord WHERE { ?item wdt:P17 wd:Q399 . ?item wdt:P190 ?sisterCity . ?sisterCity wdt:P625 ?coord . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . ?item rdfs:label ?itemLabel . ?sisterCity rdfs:label ?sisterCityLabel .
} }
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Cities that have an Armenian sister city
SELECT ?item ?itemLabel ?sisterCity ?sisterCityLabel ?coord
WHERE {
?item wdt:P17 wd:Q399 .
?item wdt:P190 ?sisterCity .
?sisterCity wdt:P625 ?coord .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
?item rdfs:label ?itemLabel .
?sisterCity rdfs:label ?sisterCityLabel .
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?coord"):::projected
v1("?item"):::projected
v4("?itemLabel"):::projected
v2("?sisterCity"):::projected
v5("?sisterCityLabel"):::projected
c2(["wd:Q399"]):::iri
c6(["bd:serviceParam"]):::iri
c8(["en"]):::literal
v1 --"wdt:P17"--> c2
v1 --"wdt:P190"--> v2
v2 --"wdt:P625"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
v1 --"rdfs:label"--> v4
v2 --"rdfs:label"--> v5
end