query-1931d4610cb5a0d66345000f4c83589d
PropertiesGerman municipality key (P439)located in the administrative territorial entity (P131)instance of (P31)country (P17)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?_Amtlicher_Gemeindeschluessel ?itemLabel ?typeLabel ?liegtinLabel ?stateLabel ?item WHERE {
?item wdt:P439 ?_Amtlicher_Gemeindeschluessel.
FILTER(REGEX(?_Amtlicher_Gemeindeschluessel, "^03"))
SERVICE wikibase:label { bd:serviceParam wikibase:language "de" }
OPTIONAL {
?item wdt:P131 ?liegtin .
?item wdt:P31 ?type .
?item wdt:P17 ?state .
}
} ORDER BY ( ?_Amtlicher_Gemeindeschluessel )
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?_Amtlicher_Gemeindeschluessel"):::projected
v2("?item"):::projected
v3("?liegtin")
v5("?state")
v4("?type")
c6(["de"]):::literal
c4(["bd:serviceParam"]):::iri
f0[["regex(?_Amtlicher_Gemeindeschluessel,'^03')"]]
f0 --> v1
v2 --"wdt:P439"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P131".-> v3
v2 --"wdt:P31"--> v4
v2 --"wdt:P17"--> v5
end