query-173f2575e1ce1c24db12522f7d0abb04

rq turtle/ttl


Objekte mit Commons-Kategorie "Dresden" ohne "liegt in Dresden"

----------------------------------------------------------

SELECT ?item ?itemLabel ?itemDescription ?commons ?image ?coordinates WHERE { ?item wdt:P17 wd:Q183. ?item wdt:P373 ?commons MINUS { ?item wdt:P131 :b1. } MINUS { ?item wdt:P159 :b2. } SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en,[AUTO_LANGUAGE]". } FILTER(REGEX(STR(?commons), "Dresden")) # Filter für Name optional {?item wdt:P31 ?instanceof }
Filter (?instanceof != wd:Q13406463). # keine Wikimedia-Liste OPTIONAL { ?item wdt:P18 ?image. } OPTIONAL { ?item wdt:P625 ?coordinates. } }

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 Commons-Kategorie "Dresden" ohne "liegt in Dresden"
#----------------------------------------------------------
SELECT ?item ?itemLabel ?itemDescription ?commons ?image ?coordinates
WHERE {
  ?item wdt:P17 wd:Q183.
  ?item wdt:P373 ?commons
  MINUS { ?item wdt:P131 _:b1. }
  MINUS { ?item wdt:P159 _:b2. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en,[AUTO_LANGUAGE]". }
  FILTER(REGEX(STR(?commons), "Dresden"))               # Filter für Name
  optional {?item wdt:P31 ?instanceof  }                
  Filter (?instanceof != wd:Q13406463).                 # keine Wikimedia-Liste
  OPTIONAL { ?item wdt:P18 ?image. }
  OPTIONAL { ?item wdt:P625 ?coordinates. }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?commons"):::projected v5("?coordinates"):::projected v4("?image"):::projected v1("?instanceof") v3("?item"):::projected a1((" ")) a2((" ")) c9(["bd:serviceParam"]):::iri c4(["wd:Q183"]):::iri c11(["de,en,#91;AUTO_LANGUAGE#93;"]):::literal f0[["?instanceof != 'wd:Q13406463'"]] f0 --> v1 f1[["regex(str(?commons),'Dresden')"]] f1 --> v2 v3 --"wdt:P17"--> c4 v3 --"wdt:P373"--> v2 subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P131"--> a1 end subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P159"--> a2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P31".-> v1 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P18".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P625".-> v5 end