A set of SPARQL examples that are used in different SIB resources
Select all reactions linked to EC numbers
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh:<http://rdf.rhea-db.org/>
SELECT
?reaction
?ecNumber
WHERE {
?reaction rdfs:subClassOf rh:Reaction .
?reaction rh:ec ?ecNumber
}
ORDER BY ?reaction
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?ecNumber"):::projected
v1("?reaction"):::projected
c2(["rh:Reaction"]):::iri
v1 --"rdfs:subClassOf"--> c2
v1 --"rh:ec"--> v2