@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:3 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Select the specific form of <a href=\"https://www.rhea-db.org/rhea/11628\">RHEA:11628</a>, a reaction that deals with general chemical classes (i.e. select the equivalent reactions involving instances of the chemical classes in <a href=\"https://www.rhea-db.org/rhea/11628\">RHEA:11628</a>"^^rdf:HTML ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh: <http://rdf.rhea-db.org/>

# Query 3
# Select the specific form of RHEA:11628.
# This query mimics the Related reactions sections of
# https://www.rhea-db.org/rhea/11628
#
SELECT ?rhea  ?equation ?childrenRhea ?childrenEquation 
WHERE {
  VALUES (?rhea) {(rh:11628)}
  ?rhea rh:equation ?equation .
  ?childrenRhea rdfs:subClassOf+ ?rhea .
  ?childrenRhea rh:equation ?childrenEquation .
}""" ;
    schema:target <https://sparql.rhea-db.org/sparql> .

