A set of SPARQL examples that are used in different SIB resources
Select all the (direct) children of carbohydrate (CHEBI:16646) in the ChEBI ontology , used in Rhea reaction or not
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
?chebiChildCarbohydrate
?chebiLabel
WHERE {
?chebiChildCarbohydrate rdfs:subClassOf CHEBI:16646 .
?chebiChildCarbohydrate rdfs:label ?chebiLabel .
}
ORDER BY ?chebiChildCarbohydrate
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?chebiChildCarbohydrate"):::projected
v2("?chebiLabel"):::projected
c2(["CHEBI:16646"]):::iri
v1 --"rdfs:subClassOf"--> c2
v1 --"rdfs:label"--> v2