Search code examples
sparqldbpedia

SPARQL - Query all things


I would like to find all DBpedia resources with rdf:type equal to owl:Thing. How can I extract such a list using SPARQL? What query would I need?


Solution

  • Since a triple would be something like :a rdf:type owl:Thing and SPARQL is using triple patterns to match triples, you need a variable at the positions of the triple which is not fixed:

    SELECT * WHERE {
     ?s a <http://www.w3.org/2002/07/owl#Thing>
    }