query-ab0c8a3b03638d8256b5272c435cb7b0
Query where an english wikipedia article exists as a redirect
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?itemLabel ?item ?spratLink ?APNILink WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
?item wdt:P2455 ?sprat_ID.
?item wdt:P225 ?taxon_name.
bind(uri(concat("http://www.environment.gov.au/cgi-bin/sprat/public/publicspecies.pl?taxon_id=",?sprat_ID)) as ?spratLink)
?item wdt:P5984 ?APNI_ID.
bind(uri(concat("https://biodiversity.org.au/nsl/services/rest/name/apni/",?APNI_ID)) as ?APNILink)
MINUS
{?article schema:about ?item. # and have an article about them
?article schema:isPartOf <https://en.wikipedia.org/> . # on *English* Wikipedia}
}
}
ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?APNILink"):::projected
v6("?APNI_ID")
v8("?article")
v2("?item"):::projected
v1("?itemLabel"):::projected
v5("?spratLink"):::projected
v3("?sprat_ID")
v4("?taxon_name")
c10([https://en.wikipedia.org/]):::iri
c2(["bd:serviceParam"]):::iri
c4(["en"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v2 --"wdt:P2455"--> v3
v2 --"wdt:P225"--> v4
bind0[/"concat('http://www.environment.gov.au/cgi-bin/sprat/public/publicspecies.pl?taxon_id=',?sprat_ID)"/]
v3 --o bind0
bind0 --as--o v5
v2 --"wdt:P5984"--> v6
bind1[/"concat('https://biodiversity.org.au/nsl/services/rest/name/apni/',?APNI_ID)"/]
v6 --o bind1
bind1 --as--o v7
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v8 --"schema:about"--> v2
v8 --"schema:isPartOf"--> c10
end