query-862a3626e09bb363230e27433f465c1d
Works in languages
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
?works
?language ?languageLabel
(CONCAT("#language/", SUBSTR(STR(?language), 32)) AS ?languageUrl)
?languageDescription
WHERE {
{
SELECT
(COUNT(*) AS ?works)
?language
WHERE {
[] wdt:P407 ?language .
}
GROUP BY ?language
}
# This is to get rid of a language number of unknown values
FILTER EXISTS { ?language ?p [] }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?works)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?language"):::projected
v4("?languageUrl")
v3("?p")
v4("?works"):::projected
a2((" "))
a1((" "))
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[[" "]]
subgraph f0e0["Exists Clause"]
e0v1 -->e0v2--> e0a1
e0v1("?language"):::projected
e0v2("?p"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> v3
f0 --> a1
v2 -->v3--> a1
a2 --"wdt:P407"--> v2
bind2[/"count(*)"/]
bind2 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end
bind3[/"concat('#language/',substring(str(?language),'32^^xsd:integer'))"/]
v2 --o bind3
bind3 --as--o v4