query-f0bbd9dca9f8b9d41e29e1b0e7098f6f
TODO
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 bd: <http://www.bigdata.com/rdf#>
#show values of "digital representation of" for files in a Category
#defaultView:ImageGrid
SELECT ?file ?image ?item WHERE {
hint:Query hint:optimizer "None".
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "commons.wikimedia.org";
wikibase:api "Generator";
mwapi:generator "categorymembers";
mwapi:gcmtitle "Category:Portrait paintings of Elizabeth I of England";
mwapi:gcmprop "ids|title";
mwapi:gcmtype "file";
mwapi:gcmlimit "max".
?pageid wikibase:apiOutput "@pageid".
?title wikibase:apiOutput mwapi:title.
}
BIND(URI(CONCAT(STR(sdc:M), ?pageid)) AS ?file)
BIND(URI(CONCAT("http://commons.wikimedia.org/wiki/Special:FilePath/", ENCODE_FOR_URI(?title))) AS ?image)
?file wdt:P6243 ?item.
}