query-d85308d7356496e14b81c109f19ed841
Top Wikipedias by number of articles about films
SELECT ?wikipediaLabel ?filmcount WHERE {
?wikipedia wdt:P31 wd:Q10876391 .
?wikipedia wdt:P424 ?sprachcode .
?wikipedia rdfs:label ?wikipediaLabel
FILTER(lang(?wikipediaLabel) = "en")
{ SELECT ?sprachcode (COUNT(DISTINCT ?film) as ?filmcount) WHERE {
?film wdt:P31/wdt:P279* wd:Q11424 .
?article schema:about ?film .
?article schema:inLanguage ?sprachcode
} GROUP BY ?sprachcode
}
} ORDER BY DESC (?filmcount) LIMIT 30
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
# Top Wikipedias by number of articles about films
SELECT ?wikipediaLabel ?filmcount WHERE {
?wikipedia wdt:P31 wd:Q10876391 .
?wikipedia wdt:P424 ?sprachcode .
?wikipedia rdfs:label ?wikipediaLabel
FILTER(lang(?wikipediaLabel) = "en")
{ SELECT ?sprachcode (COUNT(DISTINCT ?film) as ?filmcount) WHERE {
?film wdt:P31/wdt:P279* wd:Q11424 .
?article schema:about ?film .
?article schema:inLanguage ?sprachcode
} GROUP BY ?sprachcode
}
} ORDER BY DESC (?filmcount) LIMIT 30
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?article")
v5("?film")
v7("?filmcount"):::projected
v4("?sprachcode")
v3("?wikipedia")
v2("?wikipediaLabel"):::projected
a1((" "))
c3(["wd:Q10876391"]):::iri
c7(["wd:Q11424"]):::iri
f0[["?wikipediaLabel = 'en'"]]
f0 --> v2
v3 --"wdt:P31"--> c3
v3 --"wdt:P424"--> v4
v3 --"rdfs:label"--> v2
v5 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c7
v6 --"schema:about"--> v5
v6 --"schema:inLanguage"--> v4
bind2[/"count(?film)"/]
v5 --o bind2
bind2 --as--o v7