sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

54_List_all_generic_compounds

rq turtle/ttl

List all generic compounds

Use at

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh: <http://rdf.rhea-db.org/>

SELECT
  ?compound
  ?compoundName
WHERE
{
  ?compound rdfs:subClassOf rh:Polymer .
  ?compound rh:name ?compoundName .
}
ORDER BY (?compound)

graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?compound"):::projected 
  v2("?compoundName"):::projected 
  c2(["rh:Polymer"]):::iri 
  v1 --"rdfs:subClassOf"-->  c2
  v1 --"rh:name"-->  v2