query-13a49542db16f5c4a9e152e06a9ebd4a

rq turtle/ttl

SPARQL query

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
  ?language
  ?languageLabel
  ?count
  ?langLemmas
{
   {
  SELECT ?language (COUNT(*) AS ?count) {
     {
  SELECT DISTINCT ?language ?langLemma {
    INCLUDE %0.
    []
      dct:language ?language;
      wikibase:lemma ?lemma.
    BIND(LANG(?lemma) AS ?langLemma).
  }
}
  }
  GROUP BY ?language
}
   {
  SELECT
    ?language
    (GROUP_CONCAT(CONCAT(?langLemma); SEPARATOR = ", ") AS ?langLemmas)
  {
     {
  SELECT DISTINCT ?language ?langLemma {
    INCLUDE %0.
    []
      dct:language ?language;
      wikibase:lemma ?lemma.
    BIND(LANG(?lemma) AS ?langLemma).
  }
}
  }
  GROUP BY ?language
}
  SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE]"}.
}
ORDER BY
  DESC(?count)
  ASC(LCASE(?languageLabel))

Query found at