A set of SPARQL examples that are used in different TGX resources
Counts the total number of a selected entity type in WikiPathways. This example uses the default value (Entity Type "DataNode"); the WikiPathways SNORQL UI lets you change it.
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
SELECT DISTINCT (COUNT(?entity) AS ?count)
WHERE {
?entity a wp:DataNode .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?count")
v1("?entity"):::projected
c2(["wp:DataNode"]):::iri
v1 --"a"--> c2
bind1[/"count(?entity)"/]
v1 --o bind1
bind1 --as--o v2