Koetai SPARQL examples

Community-curated SPARQL example queries for multiple life-science endpoints.

View the Project on GitHub Koetai/sparql-examples

oenanthe_one_name_two_kingdoms_gbif

rq turtle/ttl

Oenanthe, one name, two kingdoms, gbif

Use at

PREFIX gbif:   <https://rs.gbif.org/terms/>
PREFIX rank:   <https://rs.gbif.org/terms/rank/>
PREFIX status: <https://rs.gbif.org/terms/status/>
PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dwc:    <http://rs.tdwg.org/dwc/terms/>
SELECT ?scientificName ?kingdom ?phylum ?taxon WHERE {
  ?taxon rdfs:label "Oenanthe" ;
         gbif:rank rank:genus ;
         gbif:taxonomicStatus status:accepted ;
         dwc:scientificName ?scientificName ;
         dwc:kingdom ?kingdom ;
         dwc:phylum  ?phylum .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?kingdom"):::projected 
  v4("?phylum"):::projected 
  v2("?scientificName"):::projected 
  v1("?taxon"):::projected 
  c6([https://rs.gbif.org/terms/status/accepted]):::iri 
  c4([https://rs.gbif.org/terms/rank/genus]):::iri 
  c2(["Oenanthe"]):::literal 
  v1 --"rdfs:label"-->  c2
  v1 --https://rs.gbif.org/terms/rank-->  c4
  v1 --https://rs.gbif.org/terms/taxonomicStatus-->  c6
  v1 --http://rs.tdwg.org/dwc/terms/scientificName-->  v2
  v1 --http://rs.tdwg.org/dwc/terms/kingdom-->  v3
  v1 --http://rs.tdwg.org/dwc/terms/phylum-->  v4