query-d5a9baf66f56b7c21024a54cdf908dd4
Propertiesinstance of (P31)subclass of (P279)country (P17)image (P18)coordinate location (P625)dissolved, abolished or demolished date (P576)
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#>
SELECT ?item ?itemLabel ?instanceLabel ?countryLabel
WHERE
{
?item wdt:P31/wdt:P279* wd:Q16970.
?item wdt:P31 ?instance.
?item wdt:P17 ?country.
FILTER EXISTS { ?item wdt:P18 ?P18. }
FILTER NOT EXISTS { ?item wdt:P625 ?P625. }
FILTER NOT EXISTS { ?item wdt:P576 ?P576. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,[AUTO_LANGUAGE]". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?P18")
v2("?P576")
v3("?P625")
v6("?country")
v5("?instance")
v1("?item"):::projected
a1((" "))
c9(["bd:serviceParam"]):::iri
c6(["wd:Q16970"]):::iri
c11(["en,de,#91;AUTO_LANGUAGE#93;"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P576"--> e0v2
e0v2("?P576"):::projected
e0v1("?item"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
v1 --"wdt:P576"--> v2
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --"wdt:P625"--> e1v2
e1v2("?P625"):::projected
e1v1("?item"):::projected
end
f1--EXISTS--> f1e1
f1 --> v1
f1 --> c2
f1 --> v3
v1 --"wdt:P625"--> v3
f2[[" "]]
subgraph f2e2["Exists Clause"]
e2v1 --"wdt:P18"--> e2v2
e2v2("?P18"):::projected
e2v1("?item"):::projected
end
f2--EXISTS--> f2e2
f2 --> v1
f2 --> c3
f2 --> v4
v1 --"wdt:P18"--> v4
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c6
v1 --"wdt:P31"--> v5
v1 --"wdt:P17"--> v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end