query-7ae4cb745e88ceedfbc97dbf02edba94
TODO
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 ?title (count(distinct ?file_title) as ?count) where {
service wikibase:mwapi {
bd:serviceParam wikibase:endpoint "commons.wikimedia.org" .
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam mwapi:generator "links" .
bd:serviceParam mwapi:titles "Commons:British_Library/MC_maps_batch_01_(GB_counties)" .
bd:serviceParam mwapi:gplnamespace 6 .
bd:serviceParam mwapi:prop "categories" .
?title wikibase:apiOutput "categories/cl/@title" .
?file_title wikibase:apiOutput "@title" .
}
} group by ?title
order by desc(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?count")
v3("?file_title"):::projected
v2("?title"):::projected
c16(["categories/cl/@title"]):::literal
c10(["Commons:British_Library/MC_maps_batch_01_(GB_counties)"]):::literal
c17(["@title"]):::literal
c2(["bd:serviceParam"]):::iri
c12(["6^^xsd:integer"]):::literal
c8(["links"]):::literal
c14(["categories"]):::literal
c4(["commons.wikimedia.org"]):::literal
c6(["Generator"]):::literal
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c2 --"mwapi:endpoint"--> c4
c2 --"mwapi:api"--> c6
c2 --"mwapi:generator"--> c8
c2 --"mwapi:titles"--> c10
c2 --"mwapi:gplnamespace"--> c12
c2 --"mwapi:prop"--> c14
v2 --"mwapi:apiOutput"--> c16
v3 --"mwapi:apiOutput"--> c17
end
bind1[/"count(?file_title)"/]
v3 --o bind1
bind1 --as--o v4