query-9508ae3c47e0216b00fac11b47e34937

rq turtle/ttl

Objekte mit PLZ von Dresden, ohne Koordinate

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#-------------------------------------------------------------------------------
# Objekte mit PLZ von Dresden, ohne Koordinate
#-------------------------------------------------------------------------------
PREFIX schema: <http://schema.org/>
#defaultView:Table
select distinct ?item ?itemLabel ?itemDescription ?plz ?image
where {
  ?item wdt:P281 ?plz.                    # Objekt hat Postleitzahl
  ?item2 wdt:P281 ?plz.                   # Vergleichsobjekt hat Postleitzahl
  FILTER(REGEX(STR(?plz), "^01[0-9]+$"))  # PLZ ist 01...
  ?item2 wdt:P131+ wd:Q1731.              # Vergleichsobjekt liegt in Verwaltungseinheit Dresden (oder Subklasse)
  OPTIONAL { ?item wdt:P18 ?image. }      # Objekt hat optional Bild
  OPTIONAL { ?item wdt:P625 ?coordinate. }# Objekt hat optional Koordinate
  FILTER(!BOUND(?coordinate))             # Objekt hat leeres Datenfeld bei Koordinate
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en,[AUTO_LANGUAGE]". }
}
Limit 100

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?coordinate") v5("?image"):::projected v3("?item"):::projected v4("?item2") v2("?plz"):::projected c8(["bd:serviceParam"]):::iri c4(["wd:Q1731"]):::iri c10(["de,en,#91;AUTO_LANGUAGE#93;"]):::literal f0[["not bound(?coordinate)"]] f0 --> v1 f1[["regex(str(?plz),'^01#91;0-9#93;+$')"]] f1 --> v2 v3 --"wdt:P281"--> v2 v4 --"wdt:P281"--> v2 v4 --"wdt:P131"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P18".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P625".-> v1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end