query-b9206db16e15df9526ac1e373f69bb15
Languages of Malaysia lexeme count
Use at
- https://query.wikidata.org/sparql
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 dct: <http://purl.org/dc/terms/>
#defaultView:BubbleChart
SELECT ?languageLabel ?label ?count
WHERE {
{
SELECT ?language (COUNT(DISTINCT ?lexeme) AS ?count) {
# only include languages where the country is set to Malaysia
?language wdt:P17 wd:Q833.
?lexeme dct:language ?language;
}
GROUP by ?language
}
# select the language and lexical category labels manually
# so that they can be combined into a single label for the bubble chart
optional { ?language rdfs:label ?languageLabel filter (lang(?languageLabel) = "en") }
}
ORDER by DESC (?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count"):::projected
v3("?language")
v2("?languageLabel"):::projected
v4("?lexeme")
c3(["wd:Q833"]):::iri
v3 --"wdt:P17"--> c3
v4 --"dct:language"--> v3
bind1[/"count(?lexeme)"/]
v4 --o bind1
bind1 --as--o v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."rdfs:label".-> v2
end