query-fe4db810b66d972c9ac430faa3d5f4b5

rq turtle/ttl

Vessel classes where members have operators the class does not

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
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 ?class ?operator ?itemLabel ?classLabel ?operatorLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en-gb,en,mul". }
  {
    SELECT DISTINCT ?item ?class ?operator WHERE {
      ?item wdt:P31/wdt:P279* wd:Q3114762.
      ?item wdt:P137 ?operator.
      ?item wdt:P289 ?class.
      MINUS {?class p:P137/ps:P137 ?operator .}
    }
    #LIMIT 300
  }
}

Query found at

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