A set of SPARQL examples that are used in different TGX resources
Counts the total number of pathways in WikiPathways.
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