query-7a482916d8a9fbc445676e59534882bd
title: Courts of Iceland (should be 10) SELECT DISTINCT ?item ?itemLabel WHERE { {?item wdt:P31/wdt:P279 wd:Q190752 .} union {?item wdt:P31/wdt:P279 wd:Q4959031 .} union {?item wdt:P31/wdt:P279* wd:Q75029 .} ?item wdt:P17 wd:Q189 .
MINUS { ?item wdt:P576 []}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_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#>
#title: Courts of Iceland (should be 10)
SELECT DISTINCT ?item ?itemLabel WHERE {
{?item wdt:P31/wdt:P279* wd:Q190752 .}
union
{?item wdt:P31/wdt:P279* wd:Q4959031 .}
union
{?item wdt:P31/wdt:P279* wd:Q75029 .}
?item wdt:P17 wd:Q189 .
MINUS { ?item wdt:P576 []}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
a4((" "))
a1((" "))
a2((" "))
a3((" "))
c5(["wd:Q75029"]):::iri
c10(["bd:serviceParam"]):::iri
c4(["wd:Q4959031"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c7(["wd:Q189"]):::iri
c3(["wd:Q190752"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> a3
a3 --"wdt:P279"--> c5
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c4
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
end
union0r <== or ==> union0l
end
v1 --"wdt:P17"--> c7
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P576"--> a4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end