query-00c4d02a1022628892668f6fad2eccc8

rq turtle/ttl

Abfrage mit möglichem Zeitpunkt aus der Vergangenheit:

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX v: <http://www.wikidata.org/prop/statement/>
SELECT ?muni ?muniLabel ?instanceLabel WHERE {
  BIND("2022-12-31"^^xsd:date AS ?day) . 
  VALUES ?instance {wd:Q116457956 wd:Q42744322} .
  ?muni p:P31 ?instanceBlock . 
  ?instanceBlock v:P31 ?instance .
  FILTER NOT EXISTS {?instanceBlock pq:P580 ?start FILTER(?start > ?day)} .
  FILTER NOT EXISTS {?instanceBlock pq:P582 ?end FILTER(?end < ?day)}  
  SERVICE wikibase:label{bd:serviceParam wikibase:language "de"}
}
ORDER BY ?muniLabel DESC(?instanceLabel) ?muni

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?day") v4("?end") v8("?instance") v6("?instanceBlock") v2("?instanceLabel"):::projected v3("?muni"):::projected v1("?muniLabel"):::projected v7("?start") c8(["de"]):::literal c6(["bd:serviceParam"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?end < ?day"]] e0f0 --> e0v1 e0f0 --> e0v2 e0v3 --"p:qualifier/P582"--> e0v1 e0v2("?day"):::projected e0v1("?end"):::projected e0v3("?instanceBlock"):::projected end f0--EXISTS--> f0e0 f0 --> v4 f0 --> v8 f0 --> v6 f0 --> c1 f1[["?end < ?day"]] f1 --> v4 f1 --> v8 v6 --"p:qualifier/P582"--> v4 f2[["not "]] subgraph f2e1["Exists Clause"] e1f0[["?start > ?day"]] e1f0 --> e1v1 e1f0 --> e1v2 e1v3 --"p:qualifier/P580"--> e1v1 e1v2("?day"):::projected e1v3("?instanceBlock"):::projected e1v1("?start"):::projected end f2--EXISTS--> f2e1 f2 --> v7 f2 --> v8 f2 --> v6 f2 --> c2 f3[["?start > ?day"]] f3 --> v7 f3 --> v8 v6 --"p:qualifier/P580"--> v7 bind4[/"'2022-12-31^^xsd:date'"/] bind4 --as--o v8 bind5[/VALUES ?instance/] bind5-->v8 bind50(["wd:Q116457956"]) bind50 --> bind5 bind51(["wd:Q42744322"]) bind51 --> bind5 v3 --"p:P31"--> v6 v6 --"p:statement/P31"--> v8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end