query-737feed343acf5f73c889b28a167d838

rq turtle/ttl

Royal Navy ships where vessel_class has 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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?itemDescription WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en-gb,en,mul". }
  {
    SELECT DISTINCT ?item WHERE {
      ?item p:P31 ?statement0.
      ?statement0 ps:P31 wd:Q3114762.
      ?item p:P137 ?statement.
      ?statement (ps:P137/(wdt:P279*)) wd:Q172771.
      MINUS { ?item p:P289 ?statement1. }
      MINUS { ?item rdf:type wdno:P289. }
    }
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v3("?statement") v2("?statement0") v4("?statement1") a1((" ")) c4(["en-gb,en,mul"]):::literal c14(["p:novalue/P289"]):::iri c2(["bd:serviceParam"]):::iri c7(["wd:Q3114762"]):::iri c11(["wd:Q172771"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"p:P31"--> v2 v2 --"p:statement/P31"--> c7 v1 --"p:P137"--> v3 v3 --"p:statement/P137"--> a1 a1 --"p:direct/P279"--> c11 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"p:P289"--> v4 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v1 --"a"--> c14 end