reteplayground
Path

Cross-source JOIN: the libraries' countries (live Wikidata)

SELECT DISTINCT ?library ?country WHERE {
  ?w fjo:heldBy ?lib .
  ?lib owl:sameAs ?wd ; rdfs:label ?library .
  ?wd wdt:P17 ?c . ?c rdfs:label ?country .
  FILTER(LANG(?country) = "en")
}
Run this query → no server · no download · no account
caviri.github.io/rete
Run this query in the playground → 15 rows · 473 ms · no server, no download — the query runs in your browser.

The query

PREFIX fjo: <https://w3id.org/fuero-juzgo/ontology#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT DISTINCT ?library ?country WHERE { ?w fjo:heldBy ?lib . ?lib owl:sameAs ?wd ; rdfs:label ?library . ?wd wdt:P17 ?c . ?c rdfs:label ?country . FILTER(LANG(?country) = "en") } ORDER BY ?country

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