query-e4c24a248c63399268937d1427d8fa55
Countries with an end time but not listed as former country SELECT ?country ?countryLabel WHERE { ?country wdt:P582|wdt:P576 ?ended. #Countries have ended or dissolved MINUS {?country wdt:P31/wdt:P279 wd:Q3024240} #Not labelled as former country #MINUS {?country2 wdt:P31/wdt:P279 wd:Q3024240} ?country wdt:P31/wdt:P279* wd:Q6256. #Country SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }
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 bd: <http://www.bigdata.com/rdf#>
#Countries with an end time but not listed as former country
SELECT ?country ?countryLabel
WHERE {
?country wdt:P582|wdt:P576 ?ended. #Countries have ended or dissolved
MINUS {?country wdt:P31/wdt:P279* wd:Q3024240} #Not labelled as former country
#MINUS {?country2 wdt:P31/wdt:P279* wd:Q3024240}
?country wdt:P31/wdt:P279* wd:Q6256. #Country
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?country"):::projected
v2("?ended")
a1((" "))
a2((" "))
c5(["wd:Q3024240"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["en"]):::literal
c6(["wd:Q6256"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P576"--> v2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P582"--> v2
end
union0r <== or ==> union0l
end
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
end
v1 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end