query-02dedf01fcbdc735989df2221209f189

rq turtle/ttl

Top ten languages by number of manuscripts

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT (SUBSTR(STR(?lang),32) AS ?wd) (COUNT(DISTINCT ?q) AS ?mcount)
WHERE {
?q (wdt:P31/wdt:P279*) wd:Q87167.
?q p:P195 ?s. ?s ps:P195 ?collection . MINUS {?s pq:P582 []}.
MINUS { ?s ps:P195 wd:Q1322278 }
?q wdt:P407 ?lang 
}
GROUP BY ?lang
ORDER BY DESC(?mcount)
LIMIT 10

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?collection") v5("?lang"):::projected v7("?mcount") v2("?q"):::projected v3("?s") v6("?wd") a2((" ")) a1((" ")) c7(["wd:Q1322278"]):::iri c3(["wd:Q87167"]):::iri v2 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c3 v2 --"p:P195"--> v3 v3 --"p:statement/P195"--> v4 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v3 --"p:qualifier/P582"--> a2 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v3 --"p:statement/P195"--> c7 end v2 --"p:direct/P407"--> v5 bind3[/"substring(str(?lang),'32^^xsd:integer')"/] v5 --o bind3 bind3 --as--o v6 bind4[/"count(?q)"/] v2 --o bind4 bind4 --as--o v7