query-fddf78acfed3f9bde47e54af7e143b48
TODO
Use at
- https://query.wikidata.org/sparql
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#>
SELECT ?city ?population ?cityLabel WHERE {
?city (wdt:P31/wdt:P279*) wd:Q515.
?city rdfs:label ?cityLabel. FILTER(LANG(?cityLabel) = "en")
?city wdt:P17 ?country .
?country rdfs:label ?countryLabel . FILTER(LANG(?countryLabel)="en")
?city wdt:P1082 ?population.
FILTER(CONTAINS(?cityLabel,"Vancouver")).
FILTER(CONTAINS(?countryLabel,"Canada")).
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?city"):::projected
v2("?cityLabel"):::projected
v4("?country")
v1("?countryLabel")
v5("?population"):::projected
a1((" "))
c6(["wd:Q515"]):::iri
f0[["contains(?countryLabel,'Canada')"]]
f0 --> v1
f1[["contains(?cityLabel,'Vancouver')"]]
f1 --> v2
f2[["?countryLabel = 'en'"]]
f2 --> v1
f3[["?cityLabel = 'en'"]]
f3 --> v2
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c6
v3 --"rdfs:label"--> v2
v3 --"wdt:P17"--> v4
v4 --"rdfs:label"--> v1
v3 --"wdt:P1082"--> v5