query-672e5e67f9660626efde0a13333cec86
SPARQL template breaks if given "}}" in query; }} template does not help}} template. Artwork parameter of the file's {{source and extracts three data points from the Category:1930s photographs in Auckland Museum gets the files in This query does not help. }})){{ template, and using }}SPARQL{{ operation, it breaks the REPLACE) in the first }}Because it contains two right curly braces (
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#>
SELECT
?file ?title
(GROUP_CONCAT(DISTINCT ?en_label; separator=", ") as ?labels_en)
(GROUP_CONCAT(DISTINCT ?mi_label; separator=", ") as ?labels_mi)
?section ?object ?id
WITH {
SELECT * WHERE {
BIND (URI(CONCAT('https://commons.wikimedia.org/entity/M', ?pageid)) AS ?file)
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Generator";
wikibase:endpoint "commons.wikimedia.org";
mwapi:gcmtitle "Category:1930s photographs in Auckland Museum";
mwapi:generator "categorymembers";
mwapi:gcmtype "file";
mwapi:gcmlimit "50";
mwapi:prop "revisions";
mwapi:rvslots "main";
mwapi:rvprop "content".
?title wikibase:apiOutput mwapi:title.
?pageid wikibase:apiOutput mwapi:pageid.
?content wikibase:apiOutput 'revisions/rev/slots/slot/text()'.
}
BIND(REPLACE(?content, "^.*?Images from Auckland Museum\\