query-4b0ee0ce497e4c59e5ccafef3c2e5543
Hide the statements with end date). I don't know what I'm doing wrong, because i have a MINUS there that should be doing the work. (Q97204885)Urraul (for example, (P582)end time Hello! I'm trying to get a query with all the municipalities that are part of the Basque Country, but I still get some that have a
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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?udalerri ?udalerriLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". }
{?udalerri wdt:P31 wd:Q484170.} UNION {?udalerri wdt:P31 wd:Q2074737}
?udalerri p:P31 ?status.
MINUS{?status ps:P582 ?old}
?udalerri wdt:P131*/^wdt:P527 wd:Q47588
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?old")
v2("?status")
v1("?udalerri"):::projected
a1((" "))
c7(["wd:Q2074737"]):::iri
c2(["bd:serviceParam"]):::iri
c11(["wd:Q47588"]):::iri
c6(["wd:Q484170"]):::iri
c4(["eu,es,fr,en"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P31"--> c7
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P31"--> c6
end
union0r <== or ==> union0l
end
v1 --"p:P31"--> v2
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v2 --"p:statement/P582"--> v3
end
v1 --"p:direct/P131"--> a1
c11 --"p:direct/P527"--> a1