query-ced1a5f0b6f3786ac02232d89f1ab3e9
Propertiesinstance of (P31)Swiss municipality code (P771)
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 ?item ?FSO_code ?Label_en ?Label_de ?Label_fr ?Label_it WHERE {
{?item wdt:P31 wd:Q70208}.
{?item wdt:P771 ?FSO_code}.
OPTIONAL { ?item rdfs:label ?Label_en . FILTER (lang(?Label_en) = "en") }
OPTIONAL { ?item rdfs:label ?Label_de . FILTER (lang(?Label_de) = "de") }
OPTIONAL { ?item rdfs:label ?Label_fr . FILTER (lang(?Label_fr) = "fr") }
OPTIONAL { ?item rdfs:label ?Label_it . FILTER (lang(?Label_it) = "it") }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?FSO_code"):::projected
v3("?Label_de"):::projected
v4("?Label_en"):::projected
v2("?Label_fr"):::projected
v1("?Label_it"):::projected
v5("?item"):::projected
c6(["wd:Q70208"]):::iri
v5 --"wdt:P31"--> c6
v5 --"wdt:P771"--> v6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."rdfs:label".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."rdfs:label".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v5 -."rdfs:label".-> v2
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v5 -."rdfs:label".-> v1
end