query-50f5512dcc655cb8ae5ea4785824a2ff

rq turtle/ttl

title:manufacturers of Norske skip having no nb label SELECT DISTINCT ?manufacturer ?manufacturerLabel WHERE { ?item wdt:P31/wdt:P279* wd:Q11446. { ?item wdt:P8047 wd:Q20. } UNION { ?item wdt:P17 wd:Q20. } ?item wdt:P176 ?manufacturer. filter not exists {?manufacturer rdfs:label ?nbLabel . filter(lang(?nbLabel)="nb") }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

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 bd: <http://www.bigdata.com/rdf#>
#title:manufacturers of Norske skip having no nb label
SELECT DISTINCT ?manufacturer ?manufacturerLabel  WHERE {
  ?item wdt:P31/wdt:P279* wd:Q11446.
  { ?item wdt:P8047 wd:Q20. }
  UNION
  { ?item wdt:P17 wd:Q20. }
  ?item wdt:P176 ?manufacturer. 
  filter not exists {?manufacturer rdfs:label ?nbLabel . filter(lang(?nbLabel)="nb") }   
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item") v2("?manufacturer"):::projected v1("?nbLabel") a1((" ")) c7(["wd:Q20"]):::iri c11(["bd:serviceParam"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal c5(["wd:Q11446"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?nbLabel = 'nb'"]] e0f0 --> e0v1 e0v2 --"rdfs:label"--> e0v1 e0v2("?manufacturer"):::projected e0v1("?nbLabel"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> v2 f0 --> c2 f1[["?nbLabel = 'nb'"]] f1 --> v1 v2 --"rdfs:label"--> v1 v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c5 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P17"--> c7 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P8047"--> c7 end union0r <== or ==> union0l end v3 --"wdt:P176"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end