query-b211b88065a5fd660593ac2a90c1dd9f

rq turtle/ttl

title:Subclasses of ship with english label and without norwegian label SELECT DISTINCT ?item ?enLabel WHERE { ?item wdt:P279+ wd:Q11446. ?item rdfs:label ?enLabel. FILTER((LANG(?enLabel)) = "en") FILTER(NOT EXISTS { ?item rdfs:label ?nbLabel. FILTER((LANG(?nbLabel)) = "nb") }) }

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#>
#title:Subclasses of ship with english label and without norwegian label
SELECT DISTINCT ?item ?enLabel
WHERE 
{
  ?item wdt:P279+ wd:Q11446. 
  ?item rdfs:label ?enLabel.
  FILTER((LANG(?enLabel)) = "en")
  FILTER(NOT EXISTS {
    ?item rdfs:label ?nbLabel.
    FILTER((LANG(?nbLabel)) = "nb")
  })
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?enLabel"):::projected v2("?item"):::projected v1("?nbLabel") c5(["wd:Q11446"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?nbLabel = 'nb'"]] e0f0 --> e0v1 e0v2 --"rdfs:label"--> e0v1 e0v2("?item"):::projected e0v1("?nbLabel"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> v2 f0 --> c2 f1[["?nbLabel = 'nb'"]] f1 --> v1 v2 --"rdfs:label"--> v1 f2[["?enLabel = 'en'"]] f2 --> v3 v2 --"wdt:P279"--> c5 v2 --"rdfs:label"--> v3