query-aed29ffb699c6a963b5217697b61758a
Group by language of labels? 12:38, 1 July 2016 (UTC)) talk (JakobVossIs it possible to group a given set of items by number of labels in each language? I'd like to see which languages are covered well for these items and which languages are not given for any label at all. -- 15:48, 1 July 2016 (UTC)) talk (Jobu0101 to access the language. --lang(?label) to access the label and ?item rdfs:label ?labelYeah, that's possible. Use 16:06, 1 July 2016 (UTC) Jura--- ? It doesn't show languages without any labels. this: Maybe like JakobVoss@ 20:08, 2 July 2016 (UTC)) talk (JakobVossThanks, that's more then required! I was looking for --
Use at
- https://query.wikidata.org/sparql
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?lang (COUNT(DISTINCT ?label) as ?items) WHERE {
# replace this comment by some query to set ?item
?item rdfs:label ?label .
BIND(lang(?label) as ?lang)
}
GROUP BY ?lang
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item")
v4("?items")
v2("?label"):::projected
v3("?lang"):::projected
v1 --"rdfs:label"--> v2
bind0[/"?label"/]
v2 --o bind0
bind0 --as--o v3
bind2[/"count(?label)"/]
v2 --o bind2
bind2 --as--o v4