query-91bfe81991b50c19f55a9d3552645b57
TODO
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?language ?languageLabel (COUNT(?language) AS ?count)
WHERE
{
?country wdt:P31 wd:Q6256.
?country wdt:P37 ?language.
?language wdt:P282 ?script.
{ ?script wdt:P279* wd:Q8229. } # The script is a subclass of Latin script.
UNION
{ ?script wdt:P31 wd:Q29575627 }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?language ?languageLabel
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count")
v2("?country")
v3("?language"):::projected
v4("?script")
c9(["bd:serviceParam"]):::iri
c7(["wd:Q29575627"]):::iri
c6(["wd:Q8229"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q6256"]):::iri
v2 --"wdt:P31"--> c2
v2 --"wdt:P37"--> v3
v3 --"wdt:P282"--> v4
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P31"--> c7
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P279"--> c6
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end
bind1[/"count(?language)"/]
v3 --o bind1
bind1 --as--o v5