A set of SPARQL examples that are used in different SIB resources
Find UniParc records whose sequence point to the most database entries
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