0

Example: Q11862829 is subclass of Q1047113, which is subclass of Q9081. Can I build a query that returns all entities of which Q11862829 is subclass of between it and Q9081? wd:Q11862829 wdt:P279+ wd:Q9081 is "close to what I want.

AtilioA
  • 419
  • 2
  • 6
  • 19
  • 1
    Have you tried this: SELECT ?entity WHERE {?entity wdt:P31 ?class . wd:Q11862829 wdt:P279* ?class . ?class wdt:P279* wd:Q9081} – Valerio Cocchi Nov 28 '20 at 19:08
  • 1
    Thanks, that was really easy but I just can't think straight these days. What I really needed was `SELECT ?class WHERE { wd:Q9081 wdt:P279+ ?class . ?class wdt:P279+ wd:Q2200417 }`. Feel free to create an answer. – AtilioA Nov 28 '20 at 21:09

0 Answers0