reteplayground
Path

🏰 Everything a castle is (P279+ ancestors)

SELECT ?ancestor ?name ?description ?instances WHERE {
  wd:Q23413 wdt:P279+ ?ancestor .
  ?ancestor rdfs:label ?name . FILTER(lang(?name) = "en")
  ?ancestor schema:description ?description . FILTER(lang…
  OPTIONAL { ?ancestor rete:instanceCount ?instances }
}
Run this query → no server · no download · no account
caviri.github.io/rete
Run this query in the playground → no server, no download — the query runs in your browser.

The query

PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX schema: <http://schema.org/> PREFIX rete: <https://w3id.org/rete/> SELECT ?ancestor ?name ?description ?instances WHERE { wd:Q23413 wdt:P279+ ?ancestor . ?ancestor rdfs:label ?name . FILTER(lang(?name) = "en") ?ancestor schema:description ?description . FILTER(lang(?description) = "en") OPTIONAL { ?ancestor rete:instanceCount ?instances } } LIMIT 60

rete playground · documentation · github.com/caviri/rete