query-a2ee4d27c101139dc099c0ddcc8b671f

rq turtle/ttl

Bilingual labelsI'm trying to build a list of physical places in New Zealand and both their en and mi language labels, as the first step to improve mi language labels. I've tried without success queries such as:

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?labelen ?labelmi WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,mi". }
  {
    SELECT DISTINCT ?item WHERE {
      ?item p:P31 ?statement0.
      ?statement0 (ps:P31/(wdt:P279*)) wd:Q2221906.
      ?item p:P17 ?statement1.
      ?statement1 (ps:P17/(wdt:P279*)) wd:Q664.
      ?item rdfs:label ?labelen.
      ?itme rdfs:label ?labelmi.
      FILTER(LANG(?labelen) = "en").
      FILTER(LANG(?labelmi) = "mi").
    }
    LIMIT 100
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v6("?itme") v2("?labelen"):::projected v1("?labelmi"):::projected v4("?statement0") v5("?statement1") a1((" ")) a2((" ")) c10(["wd:Q2221906"]):::iri c13(["wd:Q664"]):::iri c2(["bd:serviceParam"]):::iri c4(["en,mi"]):::literal subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end f0[["?labelmi = 'mi'"]] f0 --> v1 f1[["?labelen = 'en'"]] f1 --> v2 v3 --"p:P31"--> v4 v4 --"p:statement/P31"--> a1 a1 --"p:direct/P279"--> c10 v3 --"p:P17"--> v5 v5 --"p:statement/P17"--> a2 a2 --"p:direct/P279"--> c13 v3 --"rdfs:label"--> v2 v6 --"rdfs:label"--> v1