sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

25_Select_the_first_10_reactions_starting_from_the_fifth_reaction

rq turtle/ttl

Select the fifth to fiftheenth (inclusive) reactions, with the lowest identifier by alphabetic sort

Use at

PREFIX rh:<http://rdf.rhea-db.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?reaction ?reactionId WHERE {
  ?reaction rdfs:subClassOf rh:Reaction .
  ?reaction rh:id ?reactionId . 
}
ORDER BY ?reaction
LIMIT 10
OFFSET 5

graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?reaction"):::projected 
  v2("?reactionId"):::projected 
  c2(["rh:Reaction"]):::iri 
  v1 --"rdfs:subClassOf"-->  c2
  v1 --"rh:id"-->  v2