query-464db49e7542b86dfecf9c64d48bd808
TODO
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 ?P131 ?P131Label ?country ?countryLabel
WHERE
{
?item wdt:P31/wdt:P279* wd:Q3550897.
filter not exists {?item wdt:P17 [] . }
?item wdt:P131 ?P131 .
optional {?P131 wdt:P17 ?country .}
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;
v2("?P131"):::projected
v3("?country"):::projected
v1("?item"):::projected
a1((" "))
a2((" "))
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c4(["wd:Q3550897"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P17"--> e0a1
e0v1("?item"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> a1
v1 --"wdt:P17"--> a1
v1 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c4
v1 --"wdt:P131"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P17".-> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end