query-18a0e65276c1f7bdd214eac37206fd4d
potentials category without subject but maybe should be some ambassador position SELECT DISTINCT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q4167836. ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en"). FILTER(STRSTARTS(?itemLabel, "Category:Ambassadors")). FILTER NOT EXISTS{?item wdt:P301 ?_} } LIMIT 20 # too long and fail otherwise
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#potentials category without subject but maybe should be some ambassador position
SELECT DISTINCT ?item ?itemLabel WHERE {
?item wdt:P31 wd:Q4167836.
?item rdfs:label ?itemLabel .
FILTER(LANG(?itemLabel) = "en").
FILTER(STRSTARTS(?itemLabel, "Category:Ambassadors")).
FILTER NOT EXISTS{?item wdt:P301 ?_}
}
LIMIT 20 # too long and fail otherwise
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?_")
v1("?item"):::projected
v3("?itemLabel"):::projected
c5(["wd:Q4167836"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P301"--> e0v2
e0v2("?_"):::projected
e0v1("?item"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
v1 --"wdt:P301"--> v2
f1[["starts-with(?itemLabel,'Category:Ambassadors')"]]
f1 --> v3
f2[["?itemLabel = 'en'"]]
f2 --> v3
v1 --"wdt:P31"--> c5
v1 --"rdfs:label"--> v3