query-ead99444b8ec57a71e024573e2499abc
Berlin is not appears in the list of capitalsHello. I am trying to get all capitals (Q5119) with the query below but for some reason Berlin (Q64) is not in the results.
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?city ?cityLabel
WHERE {
#VALUES ?city { wd:Q64}
?city wdt:P31+ wd:Q5119.
#wd:Q183 wdt:P36 ?city.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?city"):::projected
c4(["bd:serviceParam"]):::iri
c6(["en"]):::literal
c2(["wd:Q5119"]):::iri
v1 --"wdt:P31"--> c2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end