query-bbb2d3142d372dd3ff0bc590ae1e1676
TODO
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 ?BLfD_ID ?item ?itemLabel ?itemDescription ?coords ?coord2 ?address WHERE {
  ?item wdt:P4244 ?BLfD_ID .                      # item has a P4244
  MINUS { ?item wdt:P18 [] } .                    # item has no image
  MINUS { ?item wdt:P373 [] } .                   # item has no Commonscat
  OPTIONAL { ?item wdt:P625 ?coords . }           # show coordinates
  OPTIONAL { ?item wdt:P969 ?address . }          # show address
  FILTER(SUBSTR(?BLfD_ID,1,11)="D-5-64-000-")     # P4244 value starts with D-5-64-000-
  BIND(SUBSTR(?coords,7,16) as ?coord2)           # slice the coords you want out of coords
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de,[AUTO_LANGUAGE]". }
}
ORDER BY ?BLfD_ID
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?BLfD_ID"):::projected 
  v4("?address"):::projected 
  v5("?coord2"):::projected 
  v3("?coords"):::projected 
  v2("?item"):::projected 
  a1((" "))
  a2((" "))
  c10(["bd:serviceParam"]):::iri 
  c12(["de,#91;AUTO_LANGUAGE#93;"]):::literal 
  f0[["substring(?BLfD_ID,'1^^xsd:integer','11^^xsd:integer') = 'D-5-64-000-'"]]
  f0 --> v1
  v2 --"wdt:P4244"-->  v1
  subgraph minus1["MINUS"]
    style minus1 stroke-width:6px,fill:pink,stroke:red;
    v2 --"wdt:P18"-->  a1
  end
  subgraph minus2["MINUS"]
    style minus2 stroke-width:6px,fill:pink,stroke:red;
    v2 --"wdt:P373"-->  a2
  end
  subgraph optional0["(optional)"]
  style optional0 fill:#bbf,stroke-dasharray: 5 5;
    v2 -."wdt:P625".->  v3
  end
  subgraph optional1["(optional)"]
  style optional1 fill:#bbf,stroke-dasharray: 5 5;
    v2 -."wdt:P969".->  v4
  end
  bind3[/"substring(?coords,'7^^xsd:integer','16^^xsd:integer')"/]
  v3 --o bind3
  bind3 --as--o v5
  subgraph s1["http://wikiba.se/ontology#label"]
    style s1 stroke-width:4px;
    c10 --"wikibase:language"-->  c12
  end