query-a55dedd1b70ea2b8625fd3296cc35992
Hierarchical list of subclasses, or perhaps triple or quadruple subclasses. I would like a more efficient way of finding out the current "taxonomy", however messy it is. (Q87167)manuscript (there are 187 at the moment) I am getting lots of results that are subclasses of subclasses of (Q87167)manuscript (P279)subclass of Dear all, is there a way to make SPARQL not only list subclasses of an entity, but rather depict how they are connected? While searching for My original query:
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
  {
    SELECT DISTINCT ?item WHERE {
      ?item p:P279 ?statement0.
      ?statement0 (ps:P279/(wdt:P279*)) wd:Q87167.
    }
    LIMIT 200
  }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?item"):::projected 
  v2("?statement0")
  a1((" "))
  c2(["bd:serviceParam"]):::iri 
  c8(["wd:Q87167"]):::iri 
  c4(["#91;AUTO_LANGUAGE#93;"]):::literal 
  subgraph s1["http://wikiba.se/ontology#label"]
    style s1 stroke-width:4px;
    c2 --"wikibase:language"-->  c4
  end
  v1 --"p:P279"-->  v2
  v2 --"p:statement/P279"-->  a1
  a1 --"p:direct/P279"-->  c8