query-f8ea8bafaa9ef0128632de8aa439495a
Templates on WikisourcesTemplates used on Wikisources (sorted by numbers of Wikisources where it is used), could be useful to spread good templates.
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?template ?templateLabel (COUNT(DISTINCT ?page) as ?count) (GROUP_CONCAT(DISTINCT(?page); separator=", ") as ?pages) WHERE {
?template wdt:P31/wdt:P279* wd:Q11266439 .
?page schema:about ?template .
?page schema:isPartOf/wikibase:wikiGroup "wikisource"
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?template ?templateLabel
ORDER BY DESC(?count)
limit 10
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?count")
v3("?page"):::projected
v4("?pages")
v2("?template"):::projected
a1((" "))
a2((" "))
c9(["bd:serviceParam"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c7(["wikisource"]):::literal
c3(["wd:Q11266439"]):::iri
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v3 --"schema:about"--> v2
v3 --"schema:isPartOf"--> a2
a2 --"wikibase:wikiGroup"--> c7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end
bind2[/"count(?page)"/]
v3 --o bind2
bind2 --as--o v4
bind3[/"?page"/]
v3 --o bind3
bind3 --as--o v4