query-e00f8f341476fb09c67d6945898f8de3

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?lang ?langLabel ?country ?countryLabel
where
{ 
{ select ?item ?lang where
{ ?item wdt:P31 wd:Q10876391. #find language wikipedias
  ?item wdt:P407 ?lang.       #get the wiki's 'language of work'
} }  
{ select ?country ?lang where
{ ?country wdt:P463 wd:Q1065. #id countries by their membership of the UN
  ?country wdt:P37 ?lang.     #get the official languages of the country
} }  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }  
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?country"):::projected v1("?item"):::projected v2("?lang"):::projected c8(["bd:serviceParam"]):::iri c5(["wd:Q1065"]):::iri c10(["en"]):::literal c2(["wd:Q10876391"]):::iri v1 --"wdt:P31"--> c2 v1 --"wdt:P407"--> v2 v3 --"wdt:P463"--> c5 v3 --"wdt:P37"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end