query-a0467984edfc5c576920e942c06de730

rq turtle/ttl

Gemeinden ohne Einwohner-Aktualisierung vom 30. September 2019

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>

SELECT ?muni ?key ?muniLabel ?instanceLabel WHERE {
  VALUES ?instance {wd:Q262166 wd:Q42744322} .
  ?muni wdt:P439 ?key .
  ?muni p:P31 ?instanceBlock . 
  ?instanceBlock v:P31 ?instance .
  FILTER NOT EXISTS {?instanceBlock pq:P582 ?end} .
  FILTER NOT EXISTS {
    ?muni p:P1082 ?populationBlock .
    ?populationBlock wikibase:rank wikibase:PreferredRank .
    ?populationBlock pq:P585 "2019-09-30"^^xsd:date
  }
  SERVICE wikibase:label{bd:serviceParam wikibase:language "de"}
}
ORDER BY ?key

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?end") v6("?instance") v4("?instanceBlock") v1("?key"):::projected v2("?muni"):::projected v3("?populationBlock") c13(["de"]):::literal c3(["wikibase:PreferredRank"]):::iri c5(["2019-09-30^^xsd:date"]):::literal c11(["bd:serviceParam"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:P1082"--> e0v2 e0v2 --"wikibase:rank"--> e0c3 e0v2 --"p:qualifier/P585"--> e0c5 e0v1("?muni"):::projected e0v2("?populationBlock"):::projected e0c3(["wikibase:PreferredRank"]):::iri e0c5(["2019-09-30^^xsd:date"]):::literal end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> v3 f0 --> c2 f0 --> c3 f0 --> c4 f0 --> c5 v2 --"p:P1082"--> v3 v3 --"wikibase:rank"--> c3 v3 --"p:qualifier/P585"--> c5 f1[["not "]] subgraph f1e1["Exists Clause"] e1v1 --"p:qualifier/P582"--> e1v2 e1v2("?end"):::projected e1v1("?instanceBlock"):::projected end f1--EXISTS--> f1e1 f1 --> v4 f1 --> c6 f1 --> v5 v4 --"p:qualifier/P582"--> v5 bind2[/VALUES ?instance/] bind2-->v6 bind20(["wd:Q262166"]) bind20 --> bind2 bind21(["wd:Q42744322"]) bind21 --> bind2 v2 --"p:direct/P439"--> v1 v2 --"p:P31"--> v4 v4 --"p:statement/P31"--> v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end