query-08ab6e74bbcd34ce57be0673fd06ab1d

rq turtle/ttl

Toponymic lexemes per language

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
  ?lexemes 

  ?language ?languageLabel
  (CONCAT("#language/", SUBSTR(STR(?language), 32)) AS ?languageUrl)
  ?languageDescription
WHERE {
   {
  SELECT 
    (COUNT(DISTINCT ?lexeme) AS ?lexemes)
    ?language
  WHERE {
    ?lexeme dct:language ?language ;
            wdt:P31 / wdt:P279* wd:Q7884789 .

  }
  GROUP BY ?language
}  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?lexemes)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?language"):::projected v4("?languageUrl") v2("?lexeme") v4("?lexemes"):::projected a1((" ")) c6(["bd:serviceParam"]):::iri c4(["wd:Q7884789"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"dct:language"--> v3 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 bind1[/"count(?lexeme)"/] v2 --o bind1 bind1 --as--o v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end bind2[/"concat('#language/',substring(str(?language),'32^^xsd:integer'))"/] v3 --o bind2 bind2 --as--o v4