query-73a0ec8d6be311352aa94e9f4da46a9a
SPRAT wikidata items without an enwiki article
SELECT ?item ?itemLabel?taxon_name ?sprat_ID ?spratLink 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)
MINUS
{?article schema:about ?item. # and have an article about them
?article schema:isPartOf https://en.wikipedia.org/ . # on English Wikipedia}
}
}
ORDER BY ?itemLabel ?item ?taxon_name
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#>
# SPRAT wikidata items without an enwiki article
SELECT ?item ?itemLabel?taxon_name ?sprat_ID ?spratLink 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)
MINUS
{?article schema:about ?item. # and have an article about them
?article schema:isPartOf <https://en.wikipedia.org/> . # on *English* Wikipedia}
}
}
ORDER BY ?itemLabel ?item ?taxon_name
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?article")
v2("?item"):::projected
v1("?itemLabel"):::projected
v5("?spratLink"):::projected
v4("?sprat_ID"):::projected
v3("?taxon_name"):::projected
c9([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"--> v4
v2 --"wdt:P225"--> v3
bind0[/"concat('http://www.environment.gov.au/cgi-bin/sprat/public/publicspecies.pl?taxon_id=',?sprat_ID)"/]
v4 --o bind0
bind0 --as--o v5
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v6 --"schema:about"--> v2
v6 --"schema:isPartOf"--> c9
end