query-e297162b9ca378b0dcb1b7d11aee0e1e

rq turtle/ttl

Settlements in Moldova having RO labels but without EN labels SELECT ?item ?itemLabelRO ?itemLabelEN WHERE { VALUES ?type {wd:Q3957 wd:Q515 wd:Q532 wd:Q486972} #Q486972 - human settlement; Q515 - city; Q532 - village; Q15068450 - district of Moldova; Q4229812 - commune of Moldova; Q1963041 - municipality of Moldova; Q2989457 - urban-type settlement ?item wdt:P31 ?type .
?item wdt:P17 wd:Q217 . ?item rdfs:label ?itemLabelRO filter (lang(?itemLabelRO) = "ro") . FILTER NOT EXISTS { ?item rdfs:label ?itemLabelEN filter (lang(?itemLabelEN) = "en") . } }

LIMIT 50

Use at

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#>
# Settlements in Moldova having RO labels but without EN labels
SELECT ?item ?itemLabelRO ?itemLabelEN WHERE {
  VALUES ?type {wd:Q3957 wd:Q515 wd:Q532 wd:Q486972} #Q486972 - human settlement; Q515 - city; Q532 - village; Q15068450 - district of Moldova; Q4229812 - commune of Moldova; Q1963041 - municipality of Moldova; Q2989457 - urban-type settlement
  ?item wdt:P31 ?type .   
   ?item wdt:P17 wd:Q217 .
   ?item rdfs:label ?itemLabelRO filter (lang(?itemLabelRO) = "ro") .
    FILTER NOT EXISTS { ?item rdfs:label ?itemLabelEN filter (lang(?itemLabelEN) = "en") . }
}
#LIMIT 50

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v1("?itemLabelEN"):::projected v3("?itemLabelRO"):::projected v4("?type") c6(["wd:Q217"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?itemLabelEN = 'en'"]] e0f0 --> e0v1 e0v2 --"rdfs:label"--> e0v1 e0v2("?item"):::projected e0v1("?itemLabelEN"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> v2 f0 --> c2 f1[["?itemLabelEN = 'en'"]] f1 --> v1 v2 --"rdfs:label"--> v1 f2[["?itemLabelRO = 'ro'"]] f2 --> v3 bind3[/VALUES ?type/] bind3-->v4 bind30(["wd:Q3957"]) bind30 --> bind3 bind31(["wd:Q515"]) bind31 --> bind3 bind32(["wd:Q532"]) bind32 --> bind3 bind33(["wd:Q486972"]) bind33 --> bind3 v2 --"wdt:P31"--> v4 v2 --"wdt:P17"--> c6 v2 --"rdfs:label"--> v3