query-282e9d377727a23bb0ea9a649559ff3c

rq turtle/ttl

title: items in Austria without coordinates and missing municipality SELECT DISTINCT ?item ?itemLabel ?itemDescription WHERE { ?item wdt:P17 wd:Q40 . #?item wdt:P131 wd:Q37985 . # Kärnten #?item wdt:P131/wdt:P279 wd:Q980 . # by ?item wdt:P31 [] . FILTER NOT EXISTS { ?item wdt:P625 [] . } ?item wdt:P131 ?wo . minus {?item wdt:P31/wdt:P279* wd:Q667509 .} # not is a gemeinde at minus {?item wdt:P31 wd:Q35779580.} # möglicherweise ungültiger Eintrag # minus {?item wdt:P31 wd:Q355304 .} # not a fließgewässer minus {?wo wdt:P31 wd:Q667509 .} # not a municipality (e.g. statutarstadt) at SERVICE wikibase:label { bd:serviceParam wikibase:language '[AUTO_LANGUAGE,de,en]' } } GROUP BY ?item ?itemLabel ?itemDescription

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#>
#title: items in Austria without coordinates and missing municipality
  SELECT DISTINCT ?item ?itemLabel ?itemDescription WHERE {
    ?item wdt:P17 wd:Q40 .
    #?item wdt:P131* wd:Q37985 . # Kärnten
    #?item wdt:P131*/wdt:P279* wd:Q980 . # by
    ?item wdt:P31 [] .
    FILTER NOT EXISTS { ?item wdt:P625 [] . }
    ?item wdt:P131 ?wo .
    minus {?item wdt:P31*/wdt:P279* wd:Q667509 .} # not is a gemeinde at
    minus {?item wdt:P31 wd:Q35779580.} # möglicherweise ungültiger Eintrag
    # minus {?item wdt:P31 wd:Q355304 .}  # not a fließgewässer
    minus {?wo wdt:P31 wd:Q667509 .} # not a municipality (e.g. statutarstadt) at
  SERVICE wikibase:label { bd:serviceParam wikibase:language '[AUTO_LANGUAGE,de,en]' }
} GROUP BY ?item ?itemLabel ?itemDescription

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?wo") a2((" ")) a1((" ")) a3((" ")) c8(["wd:Q35779580"]):::iri c10(["bd:serviceParam"]):::iri c3(["wd:Q40"]):::iri c7(["wd:Q667509"]):::iri c12(["#91;AUTO_LANGUAGE,de,en#93;"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P625"--> e0a1 e0v1("?item"):::projected e0a1((" ")):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> a1 v1 --"wdt:P625"--> a1 v1 --"wdt:P17"--> c3 v1 --"wdt:P31"--> a2 v1 --"wdt:P131"--> v2 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> a3 a3 --"wdt:P279"--> c7 end subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> c8 end subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; v2 --"wdt:P31"--> c7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end