query-fa94478027ddb09dc531bea1c9b0d6d2

rq turtle/ttl

UK places without Welsh label SELECT DISTINCT ?item ?itemLabel WHERE { ?item (wdt:P31/wdt:P279*) wd:Q618123. ?item wdt:P17 wd:Q145. ?item rdfs:label ?itemLabel. MINUS { ?item rdfs:label ?label2. FILTER((LANG(?label2)) = "cy") } FILTER((LANG(?itemLabel)) = "en") } LIMIT 1000

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#>
#UK places without Welsh label
SELECT DISTINCT ?item ?itemLabel WHERE {
  ?item (wdt:P31/wdt:P279*) wd:Q618123.
  ?item wdt:P17 wd:Q145.
  ?item rdfs:label ?itemLabel.
  MINUS {
    ?item rdfs:label ?label2.
    FILTER((LANG(?label2)) = "cy")
  }
  FILTER((LANG(?itemLabel)) = "en")
}
LIMIT 1000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v1("?itemLabel"):::projected v3("?label2") a1((" ")) c4(["wd:Q618123"]):::iri c6(["wd:Q145"]):::iri f0[["?itemLabel = 'en'"]] f0 --> v1 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 v2 --"wdt:P17"--> c6 v2 --"rdfs:label"--> v1 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; f2[["?label2 = 'cy'"]] f2 --> v3 v2 --"rdfs:label"--> v3 end