query-4aee4929175ec0b296f2faf840cd9900

rq turtle/ttl

Alle Bezirk in der Schweiz

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#--------------------------------
# alle Bezirk in der Schweiz
# https://de.wikipedia.org/wiki/Bezirk_(Schweiz)
#--------------------------------
#defaultView:Map,Table
SELECT distinct ?item ?itemLabel ?itemDescription (SAMPLE(?coordinate) AS ?coord)
where {
  ?item p:P31 ?statement .
  ?statement ps:P31/wdt:P279* wd:Q662914.        # Bezirk in der Schweiz
  MINUS { ?statement pq:P582 [] }                # ohne Endzeit an der Eigenschaft
  MINUS { ?item wdt:P576 [].} #_:b1. }           # ohne Auflösungsdatum am Objekt
  OPTIONAL { ?item wdt:P625 ?coordinate. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en,[AUTO_LANGUAGE]" }
} group by ?item ?itemLabel ?itemDescription
order by ?itemDescription

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?coord") v4("?coordinate"):::projected v2("?item"):::projected v1("?itemDescription"):::projected v3("?statement") a2((" ")) a3((" ")) a1((" ")) c9(["bd:serviceParam"]):::iri c4(["wd:Q662914"]):::iri c11(["de,en,#91;AUTO_LANGUAGE#93;"]):::literal v2 --"p:P31"--> v3 v3 --"p:statement/P31"--> a1 a1 --"p:direct/P279"--> c4 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v3 --"p:qualifier/P582"--> a2 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v2 --"p:direct/P576"--> a3 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P625".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end bind3[/"sample(?coordinate)"/] v4 --o bind3 bind3 --as--o v5