query-0c2a955187fa63be9644559856815dab

rq turtle/ttl

A confused hierarchy: the Ajax class is a subclass of ship of the line rather than being a subclass of n-rate. If {A instance of B, A instance of C, B subclass C} → remove {A instance of C}. If {A instance of C, B subclass C} → possibly {A instance of B}.

Use at

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 ?shipclass ?shipclassLabel
{
  # first-rate Q892367 subclass of ship of the line Q207452
  # second-rate Q892368
  # third-rate Q892492
  # fourth-rate Q892562
  # fifth-rate Q892554 is subclass of frigate Q12012855
  # sixth-rate Q892278 is subclass of frigate

  # subclass of ship of the line Q207452
  ?shipclass wdt:P279 wd:Q207452 .

  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
  }

} ORDER BY ?shipclassLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?shipclass"):::projected v1("?shipclassLabel"):::projected c2(["wd:Q207452"]):::iri c4(["bd:serviceParam"]):::iri c6(["en"]):::literal v2 --"wdt:P279"--> c2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end