query-8d974fad4e70042c473f0ddbb88d8d24
categories missing for instance of class of ambassadors to/of a country SELECT DISTINCT ?item ?itemLabel ?subclass ?subclassLabel ?cat ?catLabel WHERE { {?item wdt:P279 wd:Q29645880.} union {?item wdt:P279 wd:Q29645886} ?item wdt:P279 ?subclass. FILTER NOT EXISTS {?item wdt:P910 ?cat} SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" } }
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#>
#categories missing for instance of class of ambassadors to/of a country
SELECT DISTINCT ?item ?itemLabel ?subclass ?subclassLabel ?cat ?catLabel
WHERE
{
{?item wdt:P279 wd:Q29645880.} union {?item wdt:P279 wd:Q29645886}
?item wdt:P279 ?subclass.
FILTER NOT EXISTS {?item wdt:P910 ?cat}
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?cat"):::projected
v1("?item"):::projected
v3("?subclass"):::projected
c6(["bd:serviceParam"]):::iri
c4(["wd:Q29645886"]):::iri
c3(["wd:Q29645880"]):::iri
c8(["fr"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P910"--> e0v2
e0v2("?cat"):::projected
e0v1("?item"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
v1 --"wdt:P910"--> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P279"--> c4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P279"--> c3
end
union0r <== or ==> union0l
end
v1 --"wdt:P279"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end