The URI "https://www.w3.org/2000/01/rdf-schema#" is an RDF file with triples, prefix and other things.
So if I do this query, it should return the URIs of all the "things" that are Class
:
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select *
from <http://www.w3.org/2000/01/rdf-schema#>
where
{
?o rdf:type rdfs:Class.
} LIMIT 100 .
But running it in Virtuoso gives me an error.
I'm new with SPARQL and RDF, so could be that I'm sayng something so wrong.
In most RDF database systems ("triplestores"), such as Virtuoso, the URL you put in the FROM clause is not used to retrieve a file from the Web and read its contents. Instead, you usually have a database in which you previously loaded some RDF(S) data yourself, and the FROM clause in your query is used to identify a subset in that data (a so-called "named graph").
In order for your query to work, you should load the file at http://www.w3.org/2000/01/rdf-schema# into your Virtuoso store, making sure it uses the file location as the named graph identifier as well. You can use a SPARQL update command for this:
LOAD <http://www.w3.org/2000/01/rdf-schema#> INTO GRAPH <http://www.w3.org/2000/01/rdf-schema#>
After you've done that, the query should return results.
There are some SPARQL engines that do offer automatic retrieval of remote data like you expected (I know Eclipse RDF4J and Apache Jena Fuseki have options for this - not sure about Virtuoso) but it's not the 'typical' way to do SPARQL querying.