@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix ex: <https://sparql.rhea-db.org/.well-known/sparql-examples/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

ex:80_Select_the_number_of_approved_reactions_involving_a_carbohydrate_derivative
  a sh:SPARQLExecutable, sh:SPARQLSelectExecutable;
  rdfs:comment "Select the number of approved reactions involving a *_carbohydrate derivative_* (subclass of *CHEBI:63299*) based on the ChEBI ontology (use of *subClassOf+*)"@en ;
  sh:select """PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh:<http://rdf.rhea-db.org/>
SELECT
  (count(distinct ?reaction) as ?reactionCount)
WHERE {
  ?reaction rdfs:subClassOf rh:Reaction .
  ?reaction rh:status rh:Approved .
  ?reaction rh:side ?reactionSide .
  ?reactionSide rh:contains ?participant .
  ?participant rh:compound ?compound .
  ?compound rh:chebi ?chebi .
  ?chebi rdfs:subClassOf+ CHEBI:63299 .
}""";
  schema:target <https://sparql.rhea-db.org/sparql> .
