sparql-examples

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

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

24_Display_only_a_subset_of_reactions

rq turtle/ttl

Select the 10 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

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