query-7313420d8e3cfd18945a12a9ea9573c3
PM20 type "co/" which are not an organization
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
select ?item ?itemLabel
where {
?item wdt:P4293 ?pm20Id .
filter(regex(?pm20Id, "^co/"))
filter (not exists {
?item p:P31/ps:P31/wdt:P279* wd:Q43229 .
})
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE,de,en,es,fr]". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?pm20Id")
a1((" "))
a2((" "))
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE,de,en,es,fr#93;"]):::literal
c4(["wd:Q43229"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:P31"--> e0a1
e0a1 --"p:statement/P31"--> e0a2
e0a2 --"p:direct/P279"--> e0c4
e0v1("?item"):::projected
e0a1((" ")):::projected
e0a2((" ")):::projected
e0c4(["wd:Q43229"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> a1
f0 --> c2
f0 --> a2
f0 --> c3
f0 --> c4
v1 --"p:P31"--> a1
a1 --"p:statement/P31"--> a2
a2 --"p:direct/P279"--> c4
f1[["regex(?pm20Id,'^co/')"]]
f1 --> v2
v1 --"p:direct/P4293"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end