sparql-examples

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

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

86_taxonomy_rank_and_scientific_name

rq turtle/ttl

Retrieve the rank and the scientific name of an taxonomic record. Not all taxonomic records have a rank associated with them.

Use at

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

SELECT
  ?taxon 
  ?scientificName
  ?rank
WHERE {
  ?taxon a up:Taxon ;
         up:scientificName ?scientificName .
  OPTIONAL {
    ?taxon up:rank ?rank
  }
}
(optional)
a
up:scientificName
up:rank
?rank
?taxon
?scientificName
up:Taxon