query-7063e0cac9ca61ff8430399843b2ad0c
List of all non-plate, non-text pages in Category:Flora Batava - KB copy, and its subcategories SELECT ?category ?categoryName ?file ?title WHERE { SERVICE wikibase:mwapi { bd:serviceParam wikibase:api "Generator" . bd:serviceParam wikibase:endpoint "commons.wikimedia.org" . bd:serviceParam mwapi:gcmtitle "Category:Flora Batava - KB copy" . bd:serviceParam mwapi:generator "categorymembers" . bd:serviceParam mwapi:gcmlimit "max" . ?categoryName wikibase:apiOutput mwapi:title . ?pageid wikibase:apiOutput "@pageid" . ?ns wikibase:apiOutput "@ns". } FILTER (?ns = "14") # (sub)categories only BIND (URI(CONCAT('https://commons.wikimedia.org/entity/M', ?pageid)) AS ?category)
SERVICE wikibase:mwapi { bd:serviceParam wikibase:api "Generator" . bd:serviceParam wikibase:endpoint "commons.wikimedia.org" . bd:serviceParam mwapi:gcmtitle ?categoryName. bd:serviceParam mwapi:generator "categorymembers" . bd:serviceParam mwapi:gcmtype "file" . bd:serviceParam mwapi:gcmlimit "max" . ?title wikibase:apiOutput mwapi:title . ?pageid2 wikibase:apiOutput "@pageid" . } BIND (URI(CONCAT('https://commons.wikimedia.org/entity/M', ?pageid2)) AS ?file) FILTER(!REGEX(?title,"(Pl[0-9]{4} - FloraBatava-KB-v[0-9]{2}.jpg)$")) FILTER(!REGEX(?title,"(DescriptionFR[0-9]+ - FloraBatava-KB-v[0-9]{2}.jpg)$")) FILTER(!REGEX(?title,"(DescriptionNL[0-9]+ - FloraBatava-KB-v[0-9]{2}.jpg)$")) } ORDER BY ?category ?title
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# List of all non-plate, non-text pages in Category:Flora Batava - KB copy, and its subcategories
SELECT ?category ?categoryName ?file ?title
WHERE
{
SERVICE wikibase:mwapi
{
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam wikibase:endpoint "commons.wikimedia.org" .
bd:serviceParam mwapi:gcmtitle "Category:Flora Batava - KB copy" .
bd:serviceParam mwapi:generator "categorymembers" .
bd:serviceParam mwapi:gcmlimit "max" .
?categoryName wikibase:apiOutput mwapi:title .
?pageid wikibase:apiOutput "@pageid" .
?ns wikibase:apiOutput "@ns".
}
FILTER (?ns = "14") # (sub)categories only
BIND (URI(CONCAT('https://commons.wikimedia.org/entity/M', ?pageid)) AS ?category)
SERVICE wikibase:mwapi
{
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam wikibase:endpoint "commons.wikimedia.org" .
bd:serviceParam mwapi:gcmtitle ?categoryName.
bd:serviceParam mwapi:generator "categorymembers" .
bd:serviceParam mwapi:gcmtype "file" .
bd:serviceParam mwapi:gcmlimit "max" .
?title wikibase:apiOutput mwapi:title .
?pageid2 wikibase:apiOutput "@pageid" .
}
BIND (URI(CONCAT('https://commons.wikimedia.org/entity/M', ?pageid2)) AS ?file)
FILTER(!REGEX(?title,"(Pl[0-9]{4} - FloraBatava-KB-v[0-9]{2}.jpg)$"))
FILTER(!REGEX(?title,"(DescriptionFR[0-9]+ - FloraBatava-KB-v[0-9]{2}.jpg)$"))
FILTER(!REGEX(?title,"(DescriptionNL[0-9]+ - FloraBatava-KB-v[0-9]{2}.jpg)$"))
} ORDER BY ?category ?title