SPARQL: Get all the entities of subclasses of a certain class
问题 I've to get all the instances of a class C and subclasses (direct or indirect) of C, in SPARQL. I can get all the direct subclasses of C in this way: SELECT ?entity WHERE { ?subclass rdfs:subClassOf :C . ?entity rdf:type ?subclass . } But I can't get the instances of an indirect subclass and neither any instance of C. As I know (I've pre-calculated them) all the subclasses (direct and indirect of C), and I can build a dynamic query, is it possible build a query like the following one? SELECT