query-aeffe8c7b396fca839989956c851c5c6
people with an article on Wikispecies but no UIDs on Wikidata SELECT ?sitelink ?itemLabel with { select ?item ?sitelink where { ?item wdt:P31 wd:Q5. ?sitelink schema:about ?item ; schema:isPartOf https://species.wikimedia.org/; } } as %i where { include %i filter not exists { ?item ?wdt [] . ?wdt ^wikibase:directClaim/wdt:P31/wdt:P279* wd:Q18614948 . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY ?itemLabel
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# people with an article on Wikispecies but no UIDs on Wikidata
SELECT ?sitelink ?itemLabel where
{
{
select ?item ?sitelink where
{
?item wdt:P31 wd:Q5.
?sitelink schema:about ?item ;
schema:isPartOf <https://species.wikimedia.org/>;
}
} filter not exists { ?item ?wdt [] .
?wdt ^wikibase:directClaim/wdt:P31/wdt:P279* wd:Q18614948 .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item")
v1("?itemLabel"):::projected
v4("?sitelink"):::projected
v3("?wdt")
a1((" "))
a2((" "))
a3((" "))
c8([https://species.wikimedia.org/]):::iri
c4(["wd:Q18614948"]):::iri
c10(["bd:serviceParam"]):::iri
c5(["wd:Q5"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 -->e0v2--> e0a1
e0a2 --"wikibase:directClaim"--> e0v2
e0a2 --"wdt:P31"--> e0a3
e0a3 --"wdt:P279"--> e0c4
e0v1("?item"):::projected
e0v2("?wdt"):::projected
e0a1((" ")):::projected
e0a2((" ")):::projected
e0a3((" ")):::projected
e0c4(["wd:Q18614948"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> v3
f0 --> a1
f0 --> a2
f0 --> c1
f0 --> c2
f0 --> a3
f0 --> c3
f0 --> c4
v2 -->v3--> a1
a2 --"wikibase:directClaim"--> v3
a2 --"wdt:P31"--> a3
a3 --"wdt:P279"--> c4
v2 --"wdt:P31"--> c5
v4 --"schema:about"--> v2
v4 --"schema:isPartOf"--> c8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end