Example SPARQL queries for the knowledge graphs of the Knowledge Graph Reasoning Challenge.
SPARQL endpoint is http://kg.hozo.jp/fuseki/kgrc2020v2/sparql
select ?o
from <http://kgc.knowledge-graph.jp/data/SpeckledBand>
where
{<http://kgc.knowledge-graph.jp/data/SpeckledBand/36> <http://kgc.knowledge-graph.jp/ontology/kgc.owl#hasPredicate> ?o .}
select ?p ?o
from <http://kgc.knowledge-graph.jp/data/SpeckledBand>
where
{<http://kgc.knowledge-graph.jp/data/SpeckledBand/36> ?p ?o .}
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX kgc: <http://kgc.knowledge-graph.jp/ontology/kgc.owl#>
SELECT ?s
FROM <http://kgc.knowledge-graph.jp/data/SpeckledBand>
WHERE{
?s rdf:type kgc:Situation .
}
This SPARQL endpoint contains data for eight novels, so if you want to retrieve data only for a specific novel, specify the graph IRI of the novel to be retrieved as in FROM <>
.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX kgc: <http://kgc.knowledge-graph.jp/ontology/kgc.owl#>
SELECT ?s
FROM <http://kgc.knowledge-graph.jp/data/DancingMen>
WHERE{
?s rdf:type kgc:Situation .
}
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX kgc: <http://kgc.knowledge-graph.jp/ontology/kgc.owl#>
SELECT ?s ?sc
WHERE{
?s kgc:subject <http://kgc.knowledge-graph.jp/data/DancingMen/Qubit> ;
kgc:source ?sc.
FILTER(lang(?sc)="ja")
}
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX kgc: <http://kgc.knowledge-graph.jp/ontology/kgc.owl#>
PREFIX dm: <http://kgc.knowledge-graph.jp/data/DancingMen/>
SELECT ?s ?p ?o
FROM <http://kgc.knowledge-graph.jp/data/DancingMen>
WHERE{
?s ?p ?o.
?s rdf:type kgc:Situation .
?o rdf:type kgc:Situation .
}