query-f76d819549957e22df6c6c8d4afa8511
English Wikipedia's "taxa by author" categories without metadata
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
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 ?cat ?title WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "en.wikipedia.org";
wikibase:api "Generator";
mwapi:generator "categorymembers";
mwapi:gcmtitle "Category:Taxa by author";
mwapi:gcmprop "ids|title|type";
mwapi:gcmlimit "max".
?title wikibase:apiOutput mwapi:title.
?cat wikibase:apiOutputItem mwapi:item.
}
MINUS {
?cat p:P4224 ?contains.
?contains ps:P4224 wd:Q16521.
?contains pq:P405 ?author.
}
FILTER (?title != "Category:Animal taxa by author").
FILTER (?title != "Category:Botanical taxa by author").
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?author")
v2("?cat"):::projected
v3("?contains")
v1("?title"):::projected
c12(["Category:Taxa by author"]):::literal
c20(["mwapi:item"]):::iri
c16(["max"]):::literal
c10(["categorymembers"]):::literal
c6(["en.wikipedia.org"]):::literal
c4(["bd:serviceParam"]):::iri
c18(["mwapi:title"]):::iri
c23(["wd:Q16521"]):::iri
c14(["ids|title|type"]):::literal
c8(["Generator"]):::literal
f0[["?title != 'Category:Botanical taxa by author'"]]
f0 --> v1
f1[["?title != 'Category:Animal taxa by author'"]]
f1 --> v1
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c4 --"mwapi:endpoint"--> c6
c4 --"mwapi:api"--> c8
c4 --"mwapi:generator"--> c10
c4 --"mwapi:gcmtitle"--> c12
c4 --"mwapi:gcmprop"--> c14
c4 --"mwapi:gcmlimit"--> c16
v1 --"mwapi:apiOutput"--> c18
v2 --"mwapi:apiOutputItem"--> c20
end
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v2 --"p:P4224"--> v3
v3 --"p:statement/P4224"--> c23
v3 --"p:qualifier/P405"--> v4
end