sparql-examples

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

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

40_Select_all_citations_of_a_given_reaction

rq turtle/ttl

Select all citations of a given reaction

Use at

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

SELECT
  ?reaction
  ?citation
WHERE {
  BIND(rh:11680 AS ?reaction)
  ?reaction rdfs:subClassOf rh:Reaction .
  ?reaction rh:citation ?citation .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?citation"):::projected 
  v1("?reaction"):::projected 
  c2(["rh:Reaction"]):::iri 
  bind0[/"'rh:11680'"/]
  bind0 --as--o v1
  v1 --"rdfs:subClassOf"-->  c2
  v1 --"rh:citation"-->  v2