query-5082e668862dcb0acd9bb8e9433319ca
Abfrage mit voller Historie bezüglich Gemeindetyp und Gemeindeschlüssel:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
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 ?muni ?key ?keyRank ?keyStart ?keyEnd ?muniLabel ?typeLabel ?typeRank ?typeStart ?typeEnd WHERE {
?muni p:P439 ?keyBlock .
?keyBlock v:P439 ?key .
?keyBlock wikibase:rank ?keyRank .
VALUES ?type {wd:Q116457956 wd:Q42744322 wd:Q262166} .
?muni p:P31 ?typeBlock .
?typeBlock wikibase:rank ?typeRank .
?typeBlock v:P31 ?type .
OPTIONAL{?typeBlock pq:P580 ?typeStart} .
OPTIONAL{?typeBlock pq:P582 ?typeEnd} .
OPTIONAL{?keyBlock pq:P580 ?keyStart} .
OPTIONAL{?keyBlock pq:P582 ?keyEnd}
SERVICE wikibase:label{bd:serviceParam wikibase:language "de"}
}
ORDER BY ?key ?typeStart ?typeEnd
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?key"):::projected
v5("?keyBlock")
v11("?keyEnd"):::projected
v6("?keyRank"):::projected
v10("?keyStart"):::projected
v4("?muni"):::projected
v7("?type")
v8("?typeBlock")
v3("?typeEnd"):::projected
v9("?typeRank"):::projected
v2("?typeStart"):::projected
c11(["de"]):::literal
c9(["bd:serviceParam"]):::iri
v4 --"p:P439"--> v5
v5 --"p:statement/P439"--> v1
v5 --"wikibase:rank"--> v6
bind0[/VALUES ?type/]
bind0-->v7
bind00(["wd:Q116457956"])
bind00 --> bind0
bind01(["wd:Q42744322"])
bind01 --> bind0
bind02(["wd:Q262166"])
bind02 --> bind0
v4 --"p:P31"--> v8
v8 --"wikibase:rank"--> v9
v8 --"p:statement/P31"--> v7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v8 -."p:qualifier/P580".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v8 -."p:qualifier/P582".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P580".-> v10
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P582".-> v11
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end