query-0e11c4c1ff0740def5e046921bc9eb7d

rq turtle/ttl

Count scripts ?

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
    ?writingsystem
    ?writingsystemLabel
    (COUNT( DISTINCT ?l) as ?ct)
WHERE
{
    wd:Q23 rdfs:label ?label
    BIND( lang(?label) as ?lang)
    ?l p:P424 [ ps:P424 ?lang ; pq:P794 wd:Q22283033 ] .
    ?l wdt:P282 ?writingsystem .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
GROUP BY
    ?writingsystem
    ?writingsystemLabel
ORDER BY DESC(?ct)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?ct") v4("?l"):::projected v2("?label") v3("?lang") v5("?writingsystem"):::projected a1((" ")) c5(["wd:Q22283033"]):::iri c9(["bd:serviceParam"]):::iri c11(["en"]):::literal c1(["wd:Q23"]):::iri c1 --"rdfs:label"--> v2 bind0[/"?label"/] v2 --o bind0 bind0 --as--o v3 a1 --"p:statement/P424"--> v3 a1 --"p:qualifier/P794"--> c5 v4 --"p:P424"--> a1 v4 --"p:direct/P282"--> v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end bind2[/"count(?l)"/] v4 --o bind2 bind2 --as--o v6