query-df67e225f413a9144f543125ebf6cb06
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 ?site WHERE
{
{
SELECT ?item ?site WHERE
{
?item wdt:P856 ?site.
} LIMIT 100000 } OPTIONAL { ?item wdt:P17 ?country. }
FILTER(!BOUND(?country))
MINUS { ?item (wdt:P31/wdt:P279*) wd:Q5}
MINUS { ?item (wdt:P31/wdt:P279*) wd:Q10876391}
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("?country")
v2("?item"):::projected
v3("?site"):::projected
a1((" "))
a2((" "))
c8(["bd:serviceParam"]):::iri
c5(["wd:Q5"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c6(["wd:Q10876391"]):::iri
f0[["not bound(?country)"]]
f0 --> v1
v2 --"wdt:P856"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P17".-> v1
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
end
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v2 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end