query-0b332820729b3fa3c18d07f2733faa40

rq turtle/ttl

FabC

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#>
#defaultView:Tree
SELECT
  ?class1 ?class1Label
  ?class2 ?class2Label
  ?class3 ?class3Label
  ?class4 ?class4Label
  ?class5 ?class5Label
WHERE
{
  VALUES ?class1 { wd:Q6256 }
  ?class1 ^wdt:P279 ?class2 .
  OPTIONAL { ?class2 ^wdt:P279 ?class3 .
    OPTIONAL { ?class3 ^wdt:P279 ?class4 .
      OPTIONAL { ?class4 ^wdt:P279 ?class5 . }
    }
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO LANGUAGE],en" . }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?class1"):::projected v2("?class2"):::projected v3("?class3"):::projected v4("?class4"):::projected v5("?class5"):::projected c3(["bd:serviceParam"]):::iri c5(["#91;AUTO LANGUAGE#93;,en"]):::literal bind0[/VALUES ?class1/] bind0-->v1 bind00(["wd:Q6256"]) bind00 --> bind0 v2 --"wdt:P279"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P279".-> v2 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P279".-> v3 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P279".-> v4 end end end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c3 --"wikibase:language"--> c5 end