sparql-examples

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

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

014

rq turtle/ttl

Counts the total number of pathways in WikiPathways.

Use at

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>

SELECT DISTINCT (count(?Pathway) as ?PathwayCount)
WHERE {
    ?Pathway a wp:Pathway, skos:Collection .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?Pathway"):::projected 
  v2("?PathwayCount")
  c3(["skos:Collection"]):::iri 
  c2(["wp:Pathway"]):::iri 
  v1 --"a"-->  c2
  v1 --"a"-->  c3
  bind1[/"count(?Pathway)"/]
  v1 --o bind1
  bind1 --as--o v2