query-cdcac62731b56a6f83b06ee848552e3e
Die 107 kreisfreien Städte Deutschlands sortiert nach Bundesland und dann EinwohnernHier ist Aachen mit dabei.
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX v: <http://www.wikidata.org/prop/statement/>
SELECT ?city ?key ?cityLabel ?population ?classLabel ?stateLabel WHERE{
?class wdt:P279 wd:Q22865 .
?city p:P31 ?instanceBlock .
?instanceBlock v:P31 ?class FILTER NOT EXISTS {?instanceBlock pq:P582 ?end} .
?class wdt:P1001 ?state .
?city wdt:P439 ?key .
?city wdt:P1082 ?population
SERVICE wikibase:label{bd:serviceParam wikibase:language "de"}
}
ORDER BY ?stateLabel DESC(?population)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?city"):::projected
v5("?class")
v4("?end")
v3("?instanceBlock")
v8("?key"):::projected
v2("?population"):::projected
v7("?state")
v1("?stateLabel"):::projected
c12(["de"]):::literal
c10(["bd:serviceParam"]):::iri
c3(["wd:Q22865"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:qualifier/P582"--> e0v2
e0v2("?end"):::projected
e0v1("?instanceBlock"):::projected
end
f0--EXISTS--> f0e0
f0 --> v3
f0 --> c1
f0 --> v4
v3 --"p:qualifier/P582"--> v4
v5 --"p:direct/P279"--> c3
v6 --"p:P31"--> v3
v3 --"p:statement/P31"--> v5
v5 --"p:direct/P1001"--> v7
v6 --"p:direct/P439"--> v8
v6 --"p:direct/P1082"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end