query-6cc197e8ed19da78ff8d71dd554872fb

rq turtle/ttl

Number of articles about cats in different Wikipedias

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
SELECT ?lang (COUNT(DISTINCT ?item) AS ?count) WHERE {

  ?item wdt:P31 wd:Q146 .     #cats
  ?article schema:about ?item .
  FILTER (SUBSTR(str(?article), 11, 15) = ".wikipedia.org/") .
  ?article schema:inLanguage ?lang . 

} GROUP BY ?lang
ORDER BY DESC (?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?article") v5("?count") v3("?item"):::projected v4("?lang"):::projected c5(["wd:Q146"]):::iri f0[["substring(str(?article),'11^^xsd:integer','15^^xsd:integer') = '.wikipedia.org/'"]] f0 --> v2 v3 --"wdt:P31"--> c5 v2 --"schema:about"--> v3 v2 --"schema:inLanguage"--> v4 bind2[/"count(?item)"/] v3 --o bind2 bind2 --as--o v5