query-4fb2fa36a3f0fcea1fbbdc61db8b6140

rq turtle/ttl

Vessel classes not named after something or no_value

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?class ?ship ?classLabel ?shipLabel ?namedLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en-gb,en". }
  ?class wdt:P31/wdt:P279* wd:Q19832479.
  ?class wdt:P279* wd:Q2031121.
  ?class wdt:P137 wd:Q172771.
  MINUS {?class wdt:P138 ?named}
  MINUS {?class rdf:type wdno:P138}
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?class"):::projected v2("?named") a1((" ")) c7(["wd:Q19832479"]):::iri c13(["wdno:P138"]):::iri c4(["en-gb,en"]):::literal c8(["wd:Q2031121"]):::iri c2(["bd:serviceParam"]):::iri c10(["wd:Q172771"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c7 v1 --"wdt:P279"--> c8 v1 --"wdt:P137"--> c10 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P138"--> v2 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v1 --"a"--> c13 end