query-040977fc3cbfe280dd1f757cc8dcfa16
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?type ?typeLabel
WHERE
{
?item p:P31 ?instance_of_statement .
?instance_of_statement a wikibase:BestRank .
?instance_of_statement ps:P31 ?type .
?type wdt:P279 + wd:Q1266830 . # ?type is subclass of Pokémon type
FILTER NOT EXISTS { ?instance_of_statement pq:P518 wd:Q25931659 . }
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("?instance_of_statement")
v2("?item"):::projected
v3("?type"):::projected
c8(["wd:Q1266830"]):::iri
c10(["bd:serviceParam"]):::iri
c5(["wikibase:BestRank"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q25931659"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:qualifier/P518"--> e0c2
e0v1("?instance_of_statement"):::projected
e0c2(["wd:Q25931659"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> c2
v1 --"p:qualifier/P518"--> c2
v2 --"p:P31"--> v1
v1 --"a"--> c5
v1 --"p:statement/P31"--> v3
v3 --"p:direct/P279"--> c8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end