query-8a25ee96e9aa1ee2b90f26d549f7718d

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?municipalityLabel ?gkz ?monument ?monumentLabel WHERE {
 ?monument wdt:P1435 wd:Q1188447;
           wdt:P131+ ?municipality.
 ?municipality wdt:P131+ wd:Q42880;
               wdt:P964 ?gkz;
               wdt:P31 wd:Q667509.
 FILTER NOT EXISTS { ?monument wdt:P4219 [] }
 FILTER NOT EXISTS { ?monument rdf:type wdno:P4219 }
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?gkz"):::projected v1("?monument"):::projected v2("?municipality") a1((" ")) c2(["wdno:P4219"]):::iri c7(["wd:Q42880"]):::iri c12(["bd:serviceParam"]):::iri c10(["wd:Q667509"]):::iri c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal c5(["wd:Q1188447"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"a"--> e0c2 e0v1("?monument"):::projected e0c2(["wdno:P4219"]):::iri end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> c2 v1 --"a"--> c2 f1[["not "]] subgraph f1e1["Exists Clause"] e1v1 --"wdt:P4219"--> e1a1 e1v1("?monument"):::projected e1a1((" ")):::projected end f1--EXISTS--> f1e1 f1 --> v1 f1 --> c3 f1 --> a1 v1 --"wdt:P4219"--> a1 v1 --"wdt:P1435"--> c5 v1 --"wdt:P131"--> v2 v2 --"wdt:P131"--> c7 v2 --"wdt:P964"--> v3 v2 --"wdt:P31"--> c10 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end