sparql-examples

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

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

068

rq turtle/ttl

Counts the pathways per curation and community tag.

Use at

PREFIX wp: <http://vocabularies.wikipathways.org/wp#>

SELECT ?curationTag (count(DISTINCT ?pathway) as ?pathwayCount)
WHERE {
  ?pathway wp:ontologyTag ?curationTag .
  FILTER contains(STR(?curationTag), "Curation:")
}
GROUP BY ?curationTag
ORDER BY DESC(?pathwayCount)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?curationTag"):::projected 
  v3("?pathway"):::projected 
  v4("?pathwayCount")
  f0[["contains(str(?curationTag),'Curation:')"]]
  f0 --> v2
  v3 --"wp:ontologyTag"-->  v2
  bind2[/"count(?pathway)"/]
  v3 --o bind2
  bind2 --as--o v4