query-92762bb79504d3b0ce400919a33fe420
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?language (COUNT(*) AS ?count)
WHERE
{
?item wdt:P31 wd:Q9430 . # get oceans
# VALUES ?item {wd:12345 wd:67890} # commented out example of a QId list which could be used INSTEAD of the line above
?article schema:about ?item ; # with sitelink
schema:isPartOf ?wiki ; # that are part of this wiki
schema:inLanguage ?language . # having this language code
?wiki wikibase:wikiGroup "wikipedia" . # the wiki is a Wikipedia
# SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
# commented out - get labels. Maybe useful if you want to adapt the query
} GROUP BY ?language # group by ?language so as to count the number of items per ?language
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?article")
v5("?count")
v1("?item")
v4("?language"):::projected
v3("?wiki")
c2(["wd:Q9430"]):::iri
c7(["wikipedia"]):::literal
v1 --"wdt:P31"--> c2
v2 --"schema:about"--> v1
v2 --"schema:isPartOf"--> v3
v2 --"schema:inLanguage"--> v4
v3 --"wikibase:wikiGroup"--> c7
bind1[/"count(*)"/]
bind1 --as--o v5