sparql-examples

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

View the Project on GitHub sib-swiss/sparql-examples

31

Find UniParc records whose sequence point to the most database entries

Use at

PREFIX up: <http://purl.uniprot.org/core/>

SELECT ?sequence ?entries
WHERE
{
    SELECT 
        ?sequence 
        (COUNT(?entry) AS ?entries)
    WHERE
    {
        GRAPH <http://sparql.uniprot.org/uniparc> {
            ?sequence up:sequenceFor ?entry .
        }
    } GROUP BY ?sequence
} ORDER BY DESC(?entries)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v4("?entries"):::projected 
  v3("?entry")
  v2("?sequence"):::projected 
  v2 --"up:sequenceFor"-->  v3
  bind1[/"count(?entry)"/]
  v3 --o bind1
  bind1 --as--o v4