query-43591317936fdc64eaf08b9beaa21f00
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
?wikiitem wdt:P856 ?wiki ; # identify the item for the wiki
wdt:P424 ?language. # get its language code
# 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")
v6("?count")
v1("?item")
v5("?language"):::projected
v3("?wiki")
v4("?wikiitem")
c2(["wd:Q9430"]):::iri
v1 --"wdt:P31"--> c2
v2 --"schema:about"--> v1
v2 --"schema:isPartOf"--> v3
v4 --"wdt:P856"--> v3
v4 --"wdt:P424"--> v5
bind1[/"count(*)"/]
bind1 --as--o v6