sparql-examples

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

View the Project on GitHub BiGCAT-UM/sparql-examples

007

rq turtle/ttl

List pathways and their species.

Use at

PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>

SELECT DISTINCT (str(?title) as ?pathway) (str(?label) as ?organism)
WHERE {
    ?pw dc:title ?title ;
      wp:organismName ?label .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?label"):::projected 
  v5("?organism")
  v4("?pathway")
  v1("?pw")
  v2("?title"):::projected 
  v1 --"dc:title"-->  v2
  v1 --"wp:organismName"-->  v3
  bind0[/"str(?title)"/]
  v2 --o bind0
  bind0 --as--o v4
  bind1[/"str(?label)"/]
  v3 --o bind1
  bind1 --as--o v5