query-921f143039e15b9c02bc9977cd15c2f8

rq turtle/ttl

Alle bayr. GKZ mit Lemma, Landkreis und Name TODO

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?de_label ?dewiki_lemma ?gkz (GROUP_CONCAT(?district_label; SEPARATOR=', ') AS ?districts) WHERE {
  ?item wdt:P439 ?gkz .
  FILTER(STRSTARTS(?gkz, '09') || STRSTARTS(?gkz, '9')) .
  OPTIONAL {
    ?item wdt:P131 ?district .
    ?district rdfs:label ?district_label .
    FILTER(LANG(?district_label) = 'de') .
  }
  OPTIONAL {
    ?item rdfs:label ?de_label .
    FILTER(LANG(?de_label) = 'de') .
  }
  OPTIONAL {
    ?sitelink schema:about ?item;
              schema:isPartOf <https://de.wikipedia.org/>;
              schema:name ?dewiki_lemma .
  }
} GROUP BY ?item ?de_label ?dewiki_lemma ?gkz

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?de_label"):::projected v7("?dewiki_lemma"):::projected v5("?district") v3("?district_label"):::projected v8("?districts") v2("?gkz"):::projected v4("?item"):::projected v6("?sitelink") c9([https://de.wikipedia.org/]):::iri f0[["(starts-with(?gkz,'09') || starts-with(?gkz,'9'))"]] f0 --> v2 v4 --"wdt:P439"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P131".-> v5 v5 --"rdfs:label"--> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."rdfs:label".-> v1 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v6 -."schema:about".-> v4 v6 --"schema:isPartOf"--> c9 v6 --"schema:name"--> v7 end bind2[/"?district_label"/] v3 --o bind2 bind2 --as--o v8