Open slater2022 opened 1 year ago
@slater2022
Not a bug. When you use graph ?g { ... }
, this means triple patterns inside are belong to same graph, therefore you do not query across all graphs. Note Virtuoso RDF store is a QUAD store, not a triple store.
HTH
query
select distinct ?s
where {
graph ?g {
?s a rdfs:Class.
}
}
query result
s
--
http://www.w3.org/2002/07/owl#InverseFunctionalProperty
http://www.w3.org/2002/07/owl#SymmetricProperty
http://www.w3.org/2002/07/owl#FunctionalProperty
http://www.w3.org/2002/07/owl#TransitiveProperty
http://www.w3.org/2002/07/owl#Class
http://www.w3.org/2002/07/owl#Ontology
http://www.w3.org/2002/07/owl#OntologyProperty
http://www.w3.org/2002/07/owl#AnnotationProperty
http://www.w3.org/2002/07/owl#AllDifferent
http://www.w3.org/2002/07/owl#Restriction
http://www.w3.org/2002/07/owl#ObjectProperty
http://www.w3.org/2002/07/owl#DatatypeProperty
http://www.w3.org/2002/07/owl#DeprecatedClass
http://www.w3.org/2002/07/owl#DeprecatedProperty
http://www.w3.org/2002/07/owl#DataRange
The query result is the same as query 2
SPARQL 1.1 Query Language
elt? | ZeroOrOnePath | A path that connects the subject and object of the path by zero or one matches of elt. -- | -- | --no path matching zero rdfs:subClassOf
@imitko — Please take a look at @slater2022's followup...
use only the original data. query 1:
query result:
query 2:
query result:
The results of the two queries are different