query-54221d304c127d47e1b8e06e7eaa24ef
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 ?shipClass(REPLACE(STR(?shipClass),".*Q","Q") AS ?shipClassQ) ?shipClassLabel
WHERE
{
?shipClass wdt:P279 wd:Q11446 .
?shipClass wdt:P31/wdt:P279* wd:Q559026 .
MINUS { ?shipClass wdt:P279 ?super . FILTER ( ?super != wd:Q11446 ) ?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("?shipClass"):::projected
v3("?shipClassQ")
v2("?super")
a1((" "))
c7(["bd:serviceParam"]):::iri
c5(["wd:Q1229765"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en,fr,es,it,de,pl"]):::literal
c2(["wd:Q11446"]):::iri
c4(["wd:Q559026"]):::iri
v1 --"wdt:P279"--> c2
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c4
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
f1[["?super != 'wd:Q11446'"]]
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(?shipClass),'.*Q','Q')"/]
v1 --o bind2
bind2 --as--o v3