query-01cb77ec939979f6c4cc84aeb3f4cbd7
title: Invasive species items without Scholia template on the English Wikipedia
SELECT DISTINCT ?item ?taxonname WHERE { ?item wdt:P225 ?taxonname ; wdt:P105 wd:Q7432 . ?item wdt:P6104 wd:Q56241615.
{
SELECT ?item ?pageid
?ns WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "en.wikipedia.org" .
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam mwapi:generator "search" .
bd:serviceParam mwapi:gsrsearch "-hastemplate:Scholia" .
bd:serviceParam mwapi:gsrlimit "max" .
?item wikibase:apiOutputItem mwapi:item .
?pageid wikibase:apiOutput "@pageid" .
?ns wikibase:apiOutput "@ns" .
}
} LIMIT 10000
}
?item ^wdt:P921 ?work .
}
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: Invasive species items without Scholia template on the English Wikipedia
SELECT
DISTINCT ?item ?taxonname
WHERE {
?item wdt:P225 ?taxonname ;
wdt:P105 wd:Q7432 .
?item wdt:P6104 wd:Q56241615.
{
SELECT ?item ?pageid
?ns WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "en.wikipedia.org" .
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam mwapi:generator "search" .
bd:serviceParam mwapi:gsrsearch "-hastemplate:Scholia" .
bd:serviceParam mwapi:gsrlimit "max" .
?item wikibase:apiOutputItem mwapi:item .
?pageid wikibase:apiOutput "@pageid" .
?ns wikibase:apiOutput "@ns" .
}
} LIMIT 10000
}
?item ^wdt:P921 ?work .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v4("?ns")
v3("?pageid")
v2("?taxonname"):::projected
v5("?work")
c19(["mwapi:item"]):::iri
c5(["wd:Q56241615"]):::iri
c17(["max"]):::literal
c22(["@ns"]):::literal
c15(["-hastemplate:Scholia"]):::literal
c9(["en.wikipedia.org"]):::literal
c13(["search"]):::literal
c3(["wd:Q7432"]):::iri
c7(["bd:serviceParam"]):::iri
c21(["@pageid"]):::literal
c11(["Generator"]):::literal
v1 --"wdt:P225"--> v2
v1 --"wdt:P105"--> c3
v1 --"wdt:P6104"--> c5
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c7 --"mwapi:endpoint"--> c9
c7 --"mwapi:api"--> c11
c7 --"mwapi:generator"--> c13
c7 --"mwapi:gsrsearch"--> c15
c7 --"mwapi:gsrlimit"--> c17
v1 --"mwapi:apiOutputItem"--> c19
v3 --"mwapi:apiOutput"--> c21
v4 --"mwapi:apiOutput"--> c22
end
v5 --"wdt:P921"--> v1