query-cb42df08c738454f67766e4d751e8c83
Query for municipalities without start and end date:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?municipalityLabel ?municipality ?begindatum ?einddatum ?CBS_gemeentecode WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?municipality p:P31 ?statement.
?statement ps:P31 wd:Q2039348;
minus {?statement pq:P580 ?begindatum;}
minus { ?statement pq:P582 ?einddatum }
optional { ?municipality wdt:P382 ?CBS_gemeentecode. } }
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?CBS_gemeentecode"):::projected
v3("?begindatum"):::projected
v4("?einddatum"):::projected
v1("?municipality"):::projected
v2("?statement")
c2(["bd:serviceParam"]):::iri
c7(["wd:Q2039348"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v1 --"p:P31"--> v2
v2 --"p:statement/P31"--> c7
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v2 --"p:qualifier/P580"--> v3
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v2 --"p:qualifier/P582"--> v4
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P382".-> v5
end