@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:58_Give_me_the_reactions_involving_a_given_Rhea_generic a sh:SPARQLExecutable,
    sh:SPARQLSelectExecutable;
  rdfs:comment "Give me the reactions involving a given Rhea generic (GENERIC:11964, \"reduced [NADPH—hemoprotein reductase]\")"@en;
  sh:select """PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh: <http://rdf.rhea-db.org/>

SELECT
  ?genericSubClass
  ?labelGenericSubClass
  (count(?genericParticipant) as ?countGenericParticipant)
WHERE
{
  ?genericSubClass rdfs:subClassOf rh:GenericParticipant .
  ?genericSubClass rdfs:label ?labelGenericSubClass .
  ?genericParticipant rdfs:subClassOf* ?genericSubClass .
} GROUP BY ?genericSubClass ?labelGenericSubClass
""";
  schema:target <https://sparql.rhea-db.org/sparql> .
