query-d56da7353e328a695f8bcc78aafaaf0d
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?submarineClass(REPLACE(STR(?submarineClass),".*Q","Q") AS ?submarineClassQ) ?submarineClassLabel
WHERE
{
?submarineClass wdt:P31/wdt:P279* wd:Q1428357 .
?submarineClass wdt:P279 wd:Q2811 .
MINUS { ?submarineClass wdt:P279 ?super . FILTER ( ?super != wd:Q2811 ) ?super wdt:P279+ wd:Q1229765 . }
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr,es,it,de,pl".}
}
LIMIT 500
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?submarineClass"):::projected
v3("?submarineClassQ")
v2("?super")
a1((" "))
c4(["wd:Q2811"]):::iri
c7(["bd:serviceParam"]):::iri
c5(["wd:Q1229765"]):::iri
c3(["wd:Q1428357"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en,fr,es,it,de,pl"]):::literal
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v1 --"wdt:P279"--> c4
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
f1[["?super != 'wd:Q2811'"]]
f1 --> v2
v1 --"wdt:P279"--> v2
v2 --"wdt:P279"--> c5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind2[/"replace(str(?submarineClass),'.*Q','Q')"/]
v1 --o bind2
bind2 --as--o v3