sparql-examples

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

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

22__Select_all_reactions_and_their_equation_ordered_by_reaction_identifier

rq turtle/ttl

Select all reactions and their equation, ordered by reaction identifier

Use at

PREFIX rh:<http://rdf.rhea-db.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?reaction ?reactionId ?equation WHERE {
  ?reaction rdfs:subClassOf rh:Reaction .
  ?reaction rh:equation ?equation .
  ?reaction rh:id ?reactionId . 
}
ORDER BY ?reaction

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